There are a few universal truths in this world: the sun will rise again tomorrow, you will eventually come to scoff at what “kids call music today” and you will never have as many resources at your disposal as you would like.
But there’s always scripting: if you get sufficiently clever with how you set things up, it’ll be as if you secretly hired a robot underling to do your bidding (Though we don’t actually recommend making your scripts beep like R2D2).
While writing scripts is primarily a time saving automation feature, there are (at least) two big additional benefit:
- Scripts are executable documentation. Instead of following a checklist on how to add new users to the network, applications, permissions, etc., a script will add every user the same way every time.
- Scripted tasks simplify testing in a staging environment. It’s much better for your sanity to spin up a few VMs, develop and test the script against the staging environment until it is perfect, and then push it over to production when you’re confident of the outcome.
If you’re working mostly with Windows, you are going to be writing PowerShell . Lucky for you: PowerShell is awesome – here are some guides to get started:
Dive Right In
Open PowerShell and enter `get-help` and learn PowerShell from the help files like people did before we had the Internet. Bonus points if you have MSDN subscription CDs still kicking around from a decade ago.
Microsoft Virtual Academy
Technet’s PowerShell for Beginners
More resources at: https://blog.varonis.com/top-10-powershell-tutorials-on-the-web/
You haven’t lived until you’ve tried debugging a faulty 3,000 line shell script.
Shell scripting (typically with bash, but read up on the difference between sh and bash before jumping in) has been a deep part of unixlike system administration from the beginning.