Monday 24 August 2015

The Verb-Noun Nomenclature

Windows PowerShell Uses a Verb-Noun pair for the names of cmdlets and for their derived Microsoft .Net FrameWork Classes. For example, The Get-Command cmdlet provided by Windows PowerShell is used to retrieve all the cmdlets that are registered in Windows PowerShell.The Verb part of the name identifies the action that the cmdlets performs.The noun part of the name identifies the entity on which the action is preferred.

PowerShell cmdlets always consist of a Verb,Which represents an action and a noun which acts on it.
This naming conventions helps us to find the right cmdlets so easy.
Think about What action you need to do on the console ,Say 'Get'. then what you need ,Say 'Command'.
After all, its Get-Command,

PS C:\> Get-Command

CommandType     Name                                               Version    Source                                                                                        
-----------     ----                                               -------    ------                                                                                        
Alias           Add-ProvisionedAppxPackage                         3.0        Dism                                                                                          
Alias           Add-VMToCluster                              FailoverClusters                                                                              
Alias           Add-WindowsFeature                           ServerManager                                                                                 
Alias           Apply-WindowsUnattend                              3.0        Dism                                                                                          
Alias           Begin-WebCommitDelay                         WebAdministration                                                                             
Alias           End-WebCommitDelay                           WebAdministration                                                                             
Alias           Expand-IscsiVirtualDisk                      IscsiTarget                                                                                   
Alias           Export-DnsServerTrustAnchor                  DnsServer                                                                                     
Alias           Flush-Volume                                 Storage                                                                                       
Alias           Get-GPPermissions                            GroupPolicy                                                                                   
Alias           Get-ProvisionedAppxPackage                         3.0        Dism                                                                                          
Alias           Get-VpnServerIPsecConfiguration              RemoteAccess                                                                                  
Alias           Initialize-Volume                            Storage                                                                                       
Alias           Move-SmbClient                               SmbWitness                                                                                    
Alias           Reconcile-DhcpServerv4IPRecord               DhcpServer                                                                                    
Alias           Remove-ProvisionedAppxPackage                      3.0        Dism                                                                                          
Alias           Remove-VMFromCluster                         FailoverClusters                                                                              
Alias           Remove-WindowsFeature                        ServerManager                                                                                 
Alias           Set-GPPermissions                            GroupPolicy                                                                                   
Alias           Set-VpnServerIPsecConfiguration              RemoteAccess                                                                                  
Alias           Write-FileSystemCache                        Storage                                                                                       
Function        A:                                                                                                                                                          
Function        Add-BCDataCacheExtension                     BranchCache                                                                                   
Function        Add-BgpCustomRoute                           RemoteAccess                                                                                  
Function        Add-BgpPeer                                  RemoteAccess                                                                                  
Function        Add-BgpRouter                                RemoteAccess                                                                                  
Function        Add-BgpRoutingPolicy                         RemoteAccess                                                                                  
Function        Add-BgpRoutingPolicyForPeer                  RemoteAccess                                                                                  
Function        Add-BitLockerKeyProtector                    BitLocker                                                                                     
Function        Add-DAAppServer                              RemoteAccess                                                                                  
Function        Add-DAClient                                 RemoteAccess                                                                                  

Here , You performed a Get on Command which gives you all the cmdlets available in you Computer.

To Get Approved Verbs in PowerShell, We have a cmdlet.


This cmdlet Gives you all the approved verbs in PowerShell.

PS C:\> Get-Verb

Verb        Group         
----        -----         
Add         Common        
Clear       Common        
Close       Common        
Copy        Common        
Enter       Common        
Exit        Common        
Find        Common        
Format      Common        
Get         Common        
Hide        Common        
Join        Common        
Lock        Common        
Move        Common        
New         Common        
Open        Common        
Optimize    Common        
Pop         Common        
Push        Common        
Redo        Common        
Remove      Common        
Rename      Common        
Reset       Common        
Resize      Common        
Search      Common        
Select      Common        
Set         Common        
Show        Common        
Skip        Common        
Split       Common        
Step        Common        
Switch      Common        
Undo        Common        
Unlock      Common        
Watch       Common        
Backup      Data          
Checkpoint  Data          
Compare     Data          
Compress    Data          
Convert     Data          
ConvertFrom Data          
ConvertTo   Data          
Dismount    Data          
Edit        Data          
Expand      Data          
Export      Data          
Group       Data          
Import      Data          
Initialize  Data          
Limit       Data          
Merge       Data          
Mount       Data          
Out         Data          
Publish     Data          
Restore     Data          
Save        Data          
Sync        Data          
Unpublish   Data          
Update      Data          
Approve     Lifecycle     
Assert      Lifecycle     
Complete    Lifecycle     
Confirm     Lifecycle     
Deny        Lifecycle     
Disable     Lifecycle     
Enable      Lifecycle     
Install     Lifecycle     
Invoke      Lifecycle     
Register    Lifecycle     
Request     Lifecycle     
Restart     Lifecycle     
Resume      Lifecycle     
Start       Lifecycle     
Stop        Lifecycle     
Submit      Lifecycle     
Suspend     Lifecycle     
Uninstall   Lifecycle     
Unregister  Lifecycle     
Wait        Lifecycle     
Debug       Diagnostic    
Measure     Diagnostic    

To Get the total number of Verbs, use

PS C:\> (Get-Verb).count

No comments:

Post a Comment