Wednesday, December 30, 2015

Tuesday, December 29, 2015

View All Site collections by using Power shell sharepoint 2013

Get-SPWebApplicaiton -Limit All | "|Get-SPSite | Format-Table -Property URL,ContentDatabase

Displays the URLS of all the web applications in a server farm and the site collections in each web application.

Manage the lock status for a site collection using power shell sharepoint 2013

Set-SPSite -identity "<SiteCollection>" -LockState "<State>"
State= Unlock /NoAdditions/Readonly/NoAccess

Restore a Deleted Site Collection using Power shell sharePoint 2013

When a site collection is deleted the deleted site collection is stored in the SPDeletedSite Object.
Restore-SPDeletedSite [-identity] <SPDeletedSitePipeBind> [...]

Restore-SPDeletedSite -identify guid or /sites/site_name or an SPDeletedSite Object

Delete a Site Collection Using Power shell SharePoint 2013

Remove-SPSite -Identity "<URL>" -GradualDelete