PowerShell is an incredible tool with the ability to automate a load of your mundane tasks. A frequent question is where do I start?
Now the obvious starting point is to learn a little PowerShell – PowerShell in a Month of Lunches is ideal if you are a complete beginner otherwise jump straight to PowerShell in Practice. Both are available from www.manning.com and all good book shops.
The next thing is picking the tasks to automate. What is causing you grief? What is being done inconsistently in your organisation? What takes up a lot of time and effort?
A few things come to mind:
- creating AD user accounts and mailboxes – easy enough to create 1 in the GUI but it quickly gets tedious if you need to do many of them. Also the user names can be standardised. When I audit AD environments I see lots of examples where the names aren’t consistent – firstname lastname; lastname firstname; lastname,firstname. I really hate the last one – using a comma causes problems when creating/using distinguished names – don’t do it!
- removing expired AD accounts – its easy to test when a user last logged on – set a date and disable accounts that haven’t been used
- server configuration – most organisations have a requirement to create configuration documentation. Most admins don’t do it because its boring. Automate it with a set of WMI calls and you have instant documentation. I recently refreshed the documentation for a couple hundred servers over a few nights
- reporting e.g. disk usage, mailbox sizes, allocation of CPU and memory on virtual machines to test over commitment
Pick something that will be of immediate benefit to automate and do it. You may not get it all first pass but even taking away some of the manual work will free up a bit more time. The more you can speed up the mundane tasks the more time you have to devote to the interesting stuff