Skip to content

Instantly share code, notes, and snippets.

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