In PowerShell, nouns always come after the verb. For instance: Verb-noun, Get-Process,
New-Alias or Set-Location. One advantage of researching a noun is
that it can lead to other interesting cmdlets in the same family.
Noun
Experiments
Experiment with these commands, just substitute the noun that you are interested in:
Get-Service) Get-Service | Get-Member Get-Help
Service #
NOT Get-help | Get-Service)
Special note: the pipeline symbol displays as ¦
at the PowerShell command-line, but as | in notepad.
# To get a list of nouns for PowerShell v 2.0 try this:
Clear-Host Get-command -noun
# To get a list of nouns for PowerShell v 2.0 try this:
Clear-Host Get-command -noun Proc*
PowerShell Noun List
Acl (Get-Acl)
Alias
Childitem (Get-Childitem has an Alias of dir)
Command (Get-Command)
Content (Get-Content machines.csv)
Drives
Env
Eventlog (not eventvwr)
Guy
Recommends: WMI Monitor and It's Free!
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems. Fortunately, Solarwinds
have created a
Free WMI Monitor so that you can discover these gems of performance
information, and thus improve your PowerShell scripts. Take the guess work out of which WMI counters to use when scripting the
operating system, Active Directory or Exchange Server.
Object (Rare in that Get-object does not work, object used with where, new, group and sort, for example, new-object comobject and New-Object
DirectoryServices.DirectoryEntry. Also where-object)
This Engineer's Toolset v10 provides a comprehensive console of utilities
for troubleshooting computer problems. Guy says it helps me
monitor what's occurring on the network, and each tool teaches me more about how the
underlying system operates.
Firstly, remember the sequence: verb-noun. Secondly make a point of collecting PowerShell nouns.
Each construction begins with a verb then a hyphen, finally the Verb or object
for example, Get-Childitem. However, because 'get' is the default
PowerShell verb, it is sometimes omitted thus you see 'Service' rather than
Get-Service.
If you like this page then please share it with your friends
Please email me if you have a better example script. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.
Windows Management Instrumentation (WMI) is one of the hidden
treasures of Microsoft operating systems.
Fortunately, Solarwinds
have created the
Free WMI Monitor so that you can actually see and understand these gems of
performance information. Take the guess work out of which
WMI counters to use for applications like Microsoft Active Directory,
SQL or Exchange Server.