r/PowerShell • u/jcholder • Aug 31 '18
Script Sharing Office 365 OffBoarding Employees Script
This script can be used as part of the offboarding process for an employee. It will do the following:
Latest version 1.1.2
Block O365 Sign-In.
Disconnect Existing sessions in case employee is signed in at another location.
Forward emails or Convert to Shared Mailbox and assign to Manager
Set Internal and External Out-Of-Office
Cancel all meetings organized by employee
Remove from all distribution groups
Re-assign O365 Group Ownerships.
Remove from all O365 Groups
Make Manager admin for OneDrive for Business account
Send an email to the Manager when all is completed, with results.
http://www.thecodeasylum.com/office-365-offboarding-users-with-powershell/
The Office 365 Employee Off-Boarding Application is available now on my site, there is an x64 and x86 version so pick your flavor : http://www.thecodeasylum.com/downloads/
8
u/jcholder Aug 31 '18
It does disable the Windows AD account, however most is done in Azure because most company use DirSync from their local AD to Azure.
I might put in an option to do either a convert to shared with delegate or forwarding.