#View all site collections
Get-SPSite -Limit All
#View 10 site Collections
GEt-SpSite -Limit 10
#View Site collections for a Personal sites
Get-SpSite -Limit All|?{$_.URL -like "*personal*"}|measure
#View site collecions for all SP Contentdatabases
Get-SPContentDatabase| Get-SPSite -LImit All
#View Site Collection for a URL
Get-Spsite -Identity http://intranet.contoso.com/sites/NewTeam
#View Site collection for a specific Web Applications
Get-SPWebApplication -Identity "http://w15-sp" |Get-SpSite
#View SP 2010 site collections
Get-SPSite -Limit all -CompatibilityLevel 14
#View Usag Storage for site collection
Get-SPSite | select url, {$_.Usage.Storage}
#View subsites unders a URL Get-SPSite http://<site name>/* -Limit 100
Get-SPSite http://intranet.contoso.com/* -Limit 100
#View sites matching regular expression http://localserver/(my|personal)/sites
Get-SPSite -Identity "http://localserver/(my|personal)/sites" -Regex
#Sum of disk space usage for all sites under a web application
Get-SPWebApplication http://intranet.contoso.com | Get-SPSite -Limit All |ForEach-Object {$sum=0}{ $sum+=$_.Usage.Storage }{$sum}
#Get sites for an administrator
Get-SPSite -Filter {$_.Owner -like "*contoso\garthf*"} -Limit 10
#Start-SpAssignment for large oparations
Start-SPAssignment -global;Get-SPSite -Filter {$_.Owner -like "*contoso\garthf*"} -Limit 20 ;Stop-SPAssignment -global
#Get Title name of all websites under site collection URL
Get-SPSite "http://w15-sp" | Get-SPWeb -Limit All | Select Title
#Get Site URL
#If no host header site create using below command
#New-SpSite -Url "http://demohostheader.contoso.com" -Template "STS#0" -OwnerAlias "contoso\administrator" -HostHeaderWebApplication "http://www.contoso.com"
Get-SPSiteURL -Identity "http://demohostheader.contoso.com"
#View Designer Settings for current user,Mostly set to false
(Get-SPSite -Identity "http://intranet.contoso.com").AllowDesigner
#View settings to include external Embedding.
(Get-SPSite -Identity "http://intranet.contoso.com").AllowExternalEmbedding
#View settings to check Master Page Editing
(Get-SPSite -Identity "http://intranet.contoso.com").AllowMasterPageEditing
#Setting to check if site can be reverted to base template
(Get-SPSite -Identity "http://intranet.contoso.com").AllowRevertFromTemplate
# Settings to checck Rss Feeds
(Get-SPSite -Identity "http://intranet.contoso.com").AllowRssFeeds
#Settings to view Self service upgrade status
(Get-SPSite -Identity "http://intranet.contoso.com").AllowSelfServiceUpgrade
Get-SPSite -Limit All
#View 10 site Collections
GEt-SpSite -Limit 10
#View Site collections for a Personal sites
Get-SpSite -Limit All|?{$_.URL -like "*personal*"}|measure
#View site collecions for all SP Contentdatabases
Get-SPContentDatabase| Get-SPSite -LImit All
#View Site Collection for a URL
Get-Spsite -Identity http://intranet.contoso.com/sites/NewTeam
#View Site collection for a specific Web Applications
Get-SPWebApplication -Identity "http://w15-sp" |Get-SpSite
#View SP 2010 site collections
Get-SPSite -Limit all -CompatibilityLevel 14
#View Usag Storage for site collection
Get-SPSite | select url, {$_.Usage.Storage}
#View subsites unders a URL Get-SPSite http://<site name>/* -Limit 100
Get-SPSite http://intranet.contoso.com/* -Limit 100
#View sites matching regular expression http://localserver/(my|personal)/sites
Get-SPSite -Identity "http://localserver/(my|personal)/sites" -Regex
#Sum of disk space usage for all sites under a web application
Get-SPWebApplication http://intranet.contoso.com | Get-SPSite -Limit All |ForEach-Object {$sum=0}{ $sum+=$_.Usage.Storage }{$sum}
#Get sites for an administrator
Get-SPSite -Filter {$_.Owner -like "*contoso\garthf*"} -Limit 10
#Start-SpAssignment for large oparations
Start-SPAssignment -global;Get-SPSite -Filter {$_.Owner -like "*contoso\garthf*"} -Limit 20 ;Stop-SPAssignment -global
#Get Title name of all websites under site collection URL
Get-SPSite "http://w15-sp" | Get-SPWeb -Limit All | Select Title
#Get Site URL
#If no host header site create using below command
#New-SpSite -Url "http://demohostheader.contoso.com" -Template "STS#0" -OwnerAlias "contoso\administrator" -HostHeaderWebApplication "http://www.contoso.com"
Get-SPSiteURL -Identity "http://demohostheader.contoso.com"
#View Designer Settings for current user,Mostly set to false
(Get-SPSite -Identity "http://intranet.contoso.com").AllowDesigner
#View settings to include external Embedding.
(Get-SPSite -Identity "http://intranet.contoso.com").AllowExternalEmbedding
#View settings to check Master Page Editing
(Get-SPSite -Identity "http://intranet.contoso.com").AllowMasterPageEditing
#Setting to check if site can be reverted to base template
(Get-SPSite -Identity "http://intranet.contoso.com").AllowRevertFromTemplate
# Settings to checck Rss Feeds
(Get-SPSite -Identity "http://intranet.contoso.com").AllowRssFeeds
#Settings to view Self service upgrade status
(Get-SPSite -Identity "http://intranet.contoso.com").AllowSelfServiceUpgrade
No comments:
Post a Comment