Sunday, March 01, 2009 8:21 AM josebda
IT Administrator scripts, WMI samples and witty comments
Microsoft keeps a number of scripting examples at the Technet Scripting Center. These are mostly focused at administrators that need to write code every once in a while, as opposed to the MSDN references, focused mostly at full-time developers.
If you are an IT Administrator and you have exhausted your ability to type one-liners to handle repeating tasks, it's time to start working with scripts. These can many times go beyond simple .CMD files at times. The most interesting ones use VBScript, JavaScript and the more recent PowerShell. Most of the time, these also involve the use of WMI.
One of the best articles there are in the "Hey Scripting Guy" series, where admins send questions and get well-written answers, both in the terms of the actual scripts provided and the explanation in plain English. After doing this for a while, they have also done a great job of grouping the answers by topic, which helps when you are looking for something specific.
Here are some areas that are of special interest to me:
- File and Folder Management - http://www.microsoft.com/technet/scriptcenter/resources/qanda/files.mspx
- Active Directory - http://www.microsoft.com/technet/scriptcenter/resources/qanda/ad.mspx
- Hardware and Devices - http://www.microsoft.com/technet/scriptcenter/resources/qanda/hardware.mspx
- Events and Monitoring - http://www.microsoft.com/technet/scriptcenter/resources/qanda/events.mspx
- Operating System Tasks - http://www.microsoft.com/technet/scriptcenter/resources/qanda/os.mspx
You can pick other categories in any of those pages using the links on the top right of the page.
Among the items in the many categories, you will find:
- How to change the date and time? http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov07/hey1116.mspx
- How can I configure the IP address of a network connection? http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/hey0425.mspx
- How can I share a folder on a remote computer? http://www.microsoft.com/technet/scriptcenter/resources/qanda/jan05/hey0107.mspx
- How can I determine the grace licensing period? http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr07/hey0402.mspx
- How can I run a command line on a computer? http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept04/hey0901.mspx
- How Can I Retrieve Just Audit Failures, Warnings, and Errors from My Event Logs? http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept05/hey0913.mspx
- How Can I List the Members of a Domain Group That Belongs to the Local Administrators Group? - http://www.microsoft.com/technet/scriptcenter/resources/qanda/mar08/hey0319.mspx
If you are a hardcore developer, these will seem like basic scripts to you. However, since most are implemented using WMI, they could save you a few minutes finding the right syntax for a specific task. The explanations that come along with them are also very enlightening and, with their witty comments, even entertaining...
Jose Barreto's Blog : IT Administrator scripts, WMI samples and witty comments
No comments:
Post a Comment