PowerShell Logo Small

Get-Verb



This is the built-in help made by Microsoft for the command 'Get-Verb', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Gets approved Windows PowerShell verbs.

SYNTAX


Get-Verb [[-Verb] <string[]>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Get-Verb function gets verbs that are approved for use in Windows PowerShell commands.

Windows PowerShell recommends that cmdlet and function names have the Verb-Noun format and include an approved verb. This practice makes command names more consistent
and predictable, and easier to use, especially for users who do not speak English as a first language.

Commands that use unapproved verbs run in Windows PowerShell. However, when you import a module that includes a command with an unapproved verb in its name, the Impor
t-Module command displays a warning message.

NOTE: The verb list that Get-Verb returns might not be complete. For an updated list of approved Windows PowerShell verbs with descriptions, see "Cmdlet Verbs" in M
SDN at http://go.microsoft.com/fwlink/?LinkID=160773.



<

RELATED LINKS

Online version: http://technet.microsoft.com/library/hh852690(v=wps.630).aspx
Import-Module

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>get-verb



Description

-----------

This command gets all approved verbs.








-------------------------- EXAMPLE 2 --------------------------

C:\PS>get-verb un*

Verb Group
---- -----
Undo Common
Unlock Common
Unpublish Data
Uninstall Lifecycle
Unregister Lifecycle
Unblock Security
Unprotect Security



Description

-----------

This command gets all approved verbs that begin with "un".








-------------------------- EXAMPLE 3 --------------------------

C:\PS>get-verb | where-object {$_.Group -eq "Security"}

Verb Group
---- -----
Block Security
Grant Security
Protect Security
Revoke Security
Unblock Security
Unprotect Security



Description

-----------

This command gets all approved verbs in the Security group.








-------------------------- EXAMPLE 4 --------------------------

C:\PS>get-command -module MyModule | where { (get-verb $_.Verb) -eq $null }



Description

-----------

This command finds all commands in a module that have unapproved verbs.








-------------------------- EXAMPLE 5 --------------------------

C:\PS>$approvedVerbs = get-verb | foreach {$_.verb}

C:\PS> $myVerbs = get-command -module MyModule | foreach {$_.verb}

# Does MyModule export functions with unapproved verbs?
C:\PS> ($myVerbs | foreach {$approvedVerbs -contains $_}) -contains $false
True

# Which unapproved verbs are used in MyModule?
C:\PS> ($myverbs | where {$approvedVerbs -notcontains $_})
ForEach
Sort
Tee
Where



Description

-----------

These commands detect unapproved verbs in a module and tell which unapproved verbs were detected in the module.