I am looking to develop a powershell script that can process off-boarding for my team. We have a Hybrid On-Prem/Office 365 Environment. I would like it to do the following:
For the On-Prem side:
- Disable the AD Object
- Put Date and Time Object was disabled in the Description Field in the AD Object
- Remove all AD Memberships (Except Domain User) ***If possible create a log of that users memberships somewhere so we can revert back if need be.
- Move Object to the _Disabled OU
For the Office 365 side:
- Block Sign-in
- Force out any logged in Session (optional)
- Remove All O365 Licenses
- Convert Mailbox to Shared Mailbox
Thank you very much on your assistance with this. We need this urgently as we have massive layoffs in our company. Thank you and Stay Safe.
Also please provide the Powershell Modules needed to complete these commands. Or do i need to run them from a domain controller or the exchange server. Thanks.