Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cleanup my o365 sessions
- Register-EngineEvent PowerShell.Exiting -SupportEvent -Action {
- $Session = Get-PSSession | Where-Object {$_.ConfigurationName -like "Microsoft.Exchange"}
- ForEach($obj in $Session){
- Remove-PSSession $obj
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement