Advertisement
D0cEvil

Exchange Online - Email Clean Script with MFA

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