SharePoint Online: How to delete a Site Collection

Do you need yo delete a SPO Site collection?

You need to delete it, and then remove it from recycle bin. The next few lines will explain from Powershell command:

$cred=get-credential
#This cmdlet prompts you for credentials. Type your Office 365 administration account credentials
Connect-MsolService –Credential $cred
#connect to your O365 tenant
get-spodeletedsite
#Get a list of your deleted sites in the site collection recycle bin with
get-spodeletedsite | where {$_.url -eq "https://yoururltenant.sharepoint.com/sites/sitecollection"} | Remove-SPODeletedSite
#deletes the SC
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s