Skip to content

Instantly share code, notes, and snippets.

@sebastienlevert
Created April 6, 2015 20:04
Show Gist options
  • Save sebastienlevert/60fc58cfb3560a1e046a to your computer and use it in GitHub Desktop.
Save sebastienlevert/60fc58cfb3560a1e046a 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 but recycle the items
#-----------------------------------------------------------------------
Purge-SPOList -List $list -Recycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment