Finding out more about PowerShell cmdlets, snap ins, and modules
April 3, 2011 Leave a comment
I’m just getting myself ready for the Scripting games .. http://blogs.technet.com/b/heyscriptingguy/archive/2011/02/19/2011-scripting-games-all-links-on-one-page.aspx
So I’m brushing up on some basic Windows PowerShell commands.
In order to successfully manage a powerful management tool like PowerShell you really need to know what each cmdlet is capable of.
Before running any cmdlet for the first time I always check what members it contains, what parameters it accepts. Here are some tips I’ve thought of on the way.
Get the parameters a cmdlet accepts.
(Get-Command cmdletname).parameters
Get the properties of a cmdlet
Get-Command cmdletname | Get-Member
Get the cmdlets within a pssnapin
Get-Command –pssnapin *snapinname*
Get the cmdlets within a module
Get-Command –module *modulename*
Get the location of the pssnapin dll
Get-Command –pssnapin pssnapinname|fl dll
Diolch
Paul