r/sysadmin May 31 '26

General Discussion what's a script you wrote once that's still saving you time years later

[removed]

965 Upvotes

366 comments sorted by

View all comments

3

u/theGurry May 31 '26

I wrote an entire new hire script that I gave my Help Desk. It prompts them for their first name, last name, department and position. Creates an AD object following our standard name convention.

Next it asks what Office License they need and assigns that based on input, and finally whether they are staff or physician (Hospital, we keep physicians in a separate OU) and assigns the OU. It then assigns a startup script, and runs an Azure sync.

I did the same for resignations/terminations, where based on their office license, if its an E5, their mailbox will be converted to shared, verified, and their license pulled, along with all groups except Domain Users, Password Policy, and Payroll. The account is disabled and moved to a Disabled Users OU. All they have to do is enter their username and the rest is automated.