Try this quick, secure and comprehensive PowerShell script to automate Microsoft 365 user offboarding.