Monday, 24 August 2015

The Verb-Noun Nomenclature

Verb-Noun
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.
[REF]


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                                    2.0.0.0    FailoverClusters                                                                              
Alias           Add-WindowsFeature                                 2.0.0.0    ServerManager                                                                                 
Alias           Apply-WindowsUnattend                              3.0        Dism                                                                                          
Alias           Begin-WebCommitDelay                               1.0.0.0    WebAdministration                                                                             
Alias           End-WebCommitDelay                                 1.0.0.0    WebAdministration                                                                             
Alias           Expand-IscsiVirtualDisk                            2.0.0.0    IscsiTarget                                                                                   
Alias           Export-DnsServerTrustAnchor                        2.0.0.0    DnsServer                                                                                     
Alias           Flush-Volume                                       2.0.0.0    Storage                                                                                       
Alias           Get-GPPermissions                                  1.0.0.0    GroupPolicy                                                                                   
Alias           Get-ProvisionedAppxPackage                         3.0        Dism                                                                                          
Alias           Get-VpnServerIPsecConfiguration                    2.0.0.0    RemoteAccess                                                                                  
Alias           Initialize-Volume                                  2.0.0.0    Storage                                                                                       
Alias           Move-SmbClient                                     2.0.0.0    SmbWitness                                                                                    
Alias           Reconcile-DhcpServerv4IPRecord                     2.0.0.0    DhcpServer                                                                                    
Alias           Remove-ProvisionedAppxPackage                      3.0        Dism                                                                                          
Alias           Remove-VMFromCluster                               2.0.0.0    FailoverClusters                                                                              
Alias           Remove-WindowsFeature                              2.0.0.0    ServerManager                                                                                 
Alias           Set-GPPermissions                                  1.0.0.0    GroupPolicy                                                                                   
Alias           Set-VpnServerIPsecConfiguration                    2.0.0.0    RemoteAccess                                                                                  
Alias           Write-FileSystemCache                              2.0.0.0    Storage                                                                                       
Function        A:                                                                                                                                                          
Function        Add-BCDataCacheExtension                           1.0.0.0    BranchCache                                                                                   
Function        Add-BgpCustomRoute                                 2.0.0.0    RemoteAccess                                                                                  
Function        Add-BgpPeer                                        2.0.0.0    RemoteAccess                                                                                  
Function        Add-BgpRouter                                      2.0.0.0    RemoteAccess                                                                                  
Function        Add-BgpRoutingPolicy                               2.0.0.0    RemoteAccess                                                                                  
Function        Add-BgpRoutingPolicyForPeer                        2.0.0.0    RemoteAccess                                                                                  
Function        Add-BitLockerKeyProtector                          1.0.0.0    BitLocker                                                                                     
Function        Add-DAAppServer                                    2.0.0.0    RemoteAccess                                                                                  
Function        Add-DAClient                                       2.0.0.0    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.

Get-Verb




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
98





No comments:

Post a comment