Preliminary information

This article, or rather this script, is based on the GitHub script of the AdminDroid team.
Before I get to my script and my article, I would like to point out the initial script that motivated me to create my script and this article for the community.

Thanks again to AdminDroid for making this available to the community.

 

Now to my article:

As already mentioned, I took a look at the Admin Droid script and thought about what was missing and how it could be extended for administrators.
In addition to the “doing”, the documentation is also important to me.

The functions of my script have been extended somewhat.
It also seems important to me that no modifications are necessary when executing the script and that the executing administrator knows exactly what the script is currently doing at all times.
I have therefore shown how my version of the script works, as shown in the screenshot below.
When the script is started, the administrator is asked to enter the UPN of the user for whom the offboarding is to be carried out.
Each step is then displayed in the console.

 

After the script has run through, I have added a loop to it, which takes the administrator back to the selection menu.
Especially when the point 15 “All the above operations” is executed, I find it important that a report is generated afterwards, which can be filed in the business documents as documentation.
I have opted for an HTML report here.
A corresponding example is shown below.
This report contains the following information:

  • Info about which user has been offboarded.
  • Info about which admin carried out the offboarding.
  • Tasks that have been executed, including the status.

Finally, the HTML report and a CSV file are stored under C:\Temp, which can be further processed by the administrator if required.

 

Download the Script

As always, although I have tested and used the script several times, I cannot and will not accept any liability for the use of this script.
Readers who download the script are free to customize it according to their needs. Commercial use is allowed, but monetarization requires my explicit permission.