Get-SPSite -Limit all | Select-Object Url, Owner, SecondaryContact | Format-Table -AutoSize
This one-liner returns a handy list of all the site collections in the farm, along with each site collection’s owner and secondary owner.
Get-SPSite | Get-Member
Running this command will show Owners and SecondaryContact to retrieve the names of the primary and secondary owners.
Get-SPWeb http://portal.contoso.com/mysteryweb | Select-Object Url, WebTemplate, WebTemplateId | Format-Table –AutoSize
This command will list the template and template ID used by the site.
Get-Command -Module Microsoft.Sharepoint.Powershell
This command lists all the SharePoint-related cmdlets: There are more than 500, which is too many cmdlets to digest at once. So, you can start refining any cmdlet searches with other parameters.
For example, the following one-liner gives you all the cmdlets that deal with site collections or SPSites as PowerShell refers to them:
Get-Command -Noun SPSite
You can substitute any cmdlet verb or noun in that command. You can also use wildcards like this:
Get-Command *SPSite*
If you have any queries and concerns do let me know.
No comments:
Post a Comment
Your feedback is always appreciated. I will try to reply to your queries as soon as possible- Amol Ghuge
Note: Only a member of this blog may post a comment.