SharePoint 2010 offers over 500 cmdlets that you can use to automate the SharePoint 2010 environment. But how do you find the cmdlets available? Get-Command is the answer and the cmdlet offers a couple of really nice features you can use to gather information regarding the SharePoint 2010 cmdlets.
To find all SharePoint 2010 cmdlets available use the –noun parameter:
Get-Command –Noun SP*
To find specific SharePoint 2010 cmdlets such as cmdlets handling SPSite or SPWeb, use this:
Get-Command –Noun SPWeb*
The command above returns all cmdlets where the noun contains SPWeb followed by any character, if you only want to retrieve the SPWeb cmdlets you can type:
Get-Command –Noun SPWeb
To find out what a specific cmdlet really “is” and how PowerShell interprets it, you can use:
Get-Command Get-SPWeb
You can see all of the information Get-Command returns for any given command by piping the result to Format-List and use a star ("*") to make all properties visible:
Get-Command Get-SPWeb | Format-List *
ReTweet this Tip!
Posted
Aug 23 2010, 08:00 AM
by
sos