Skip to content

Instantly share code, notes, and snippets.

@bill-long
Created June 18, 2020 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bill-long/94ee980730e0fa6aedb5bca28eb6305e to your computer and use it in GitHub Desktop.
Save bill-long/94ee980730e0fa6aedb5bca28eb6305e to your computer and use it in GitHub Desktop.
"\FolderA\Folder1" | % {
$folder = Get-PublicFolder $_ -Mailbox (Get-OrganizationConfig).RootPublicFolderMailbox.ToString()
$contentMailbox = $folder.ContentMailboxName
$dumpsterId = $folder.DumpsterEntryId
$dumpsterInContentMailbox = Get-PublicFolder $dumpsterId -Mailbox $contentMailbox -ErrorAction SilentlyContinue
if ($dumpsterInContentMailbox -ne $null) {
"Deletions should work."
} else {
"Deletions should not work."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment