Advertisement
D0cEvil

Exchange Online - Email Clean Script

Dec 6th, 2022
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.33 KB | Cybersecurity | 0 0
  1. Import-Module ExchangeOnlineManagement
  2.  
  3. $UserPrincipalName = Read-Host "Please put your UserPrincipalName"
  4. Connect-IPPSSession -UserPrincipalName $UserPrincipalName
  5.  
  6. $SearchName = Read-Host "Name of the Content Search"
  7.  
  8. New-ComplianceSearchAction -SearchName $SearchName -Purge -PurgeType HardDelete
  9.  
  10. Get-ComplianceSearchAction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement