Skip to content

Instantly share code, notes, and snippets.

@sebastienlevert
Created April 6, 2015 20:03
Show Gist options
  • Save sebastienlevert/c6f27f68331e24354f1f to your computer and use it in GitHub Desktop.
Save sebastienlevert/c6f27f68331e24354f1f to your computer and use it in GitHub Desktop.
#-----------------------------------------------------------------------
# Loads the Purge-SPOList Cmdlets
#-----------------------------------------------------------------------
. .\Purge-SPOList.ps1
#-----------------------------------------------------------------------
# Connects to your Office 365 SharePoint Online tenant
#-----------------------------------------------------------------------
Connect-SPOnline -Url https://<tenant>.sharepoint.com -Credentials <credentialslabel>
#-----------------------------------------------------------------------
# Gets the desired based on its Url
#-----------------------------------------------------------------------
$list = Get-SPOList -Identity "Lists/<Name>"
#-----------------------------------------------------------------------
# Purge the list
#-----------------------------------------------------------------------
Purge-SPOList -List $list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment