Home > Windows Server Tips > Windows Systems and Network Administration > Write Active Directory management scripts automatically
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WINDOWS SYSTEMS AND NETWORK ADMINISTRATION

Write Active Directory management scripts automatically


Serdar Yegulalp, Contributor
02.09.2006
Rating: -5.00- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Back in December I wrote about a remarkable free tool from Microsoft called Scriptomatic, which helps you write Visual Basic scripts to work with Windows Management Instrumentation (WMI). Since WMI is on the arcane side (like many other scriptable/programmable Windows interfaces), it's always a blessing to get whatever help you can in putting together scripts to work with it.

Now "The Scripting Guys" at Microsoft (yes, that's how they bill themselves) have created ADSI Scriptomatic, a follow-up to the original Scriptomatic. But instead of writing scripts for WMI, this tool writes scripts for the Active Directory Search Interfaces (ADSI). Basically, it helps you create scripts to do common tasks with Active Directory, such as creating, reading, writing or deleting an object in AD, with the object types being a user, computer, contact, group or organizational unit.

The tool itself is fairly simple. Unpack it anywhere (it doesn't need to be installed to work), run it, and select both an action and an AD object type from the two drop-downs at the top of the form. When you do this, a sample script with comments will be generated in the body of the form, with each step of the code commented. Obviously, this code doesn't have to be used entirely as is: If you just want to scavenge the generated code for a single statement or two -- such as how to read and interpret the values for a single property in a given object -- that's fine (and is, in fact, its intended use).

Click on the Save button to write the results out to a finished script, or you can simply copy and paste from the open window into whatever code you're working on. Click Run, and the code currently in the code window (which can be edited in place, by the way) will be executed from a command-line script session.


Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!

More information from SearchWinSystems.com


Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Windows Systems and Network Administration
Troubleshooting Windows application crashes or hangs
Converting VMware ESX machines to Hyper-V format
Using DFSR for SYSVOL replication in Windows Server 2008
Top 25 Windows PowerShell commands for administrators
Key DFS improvements in Windows Server 2008 R2
Free Windows security tools every admin must have
Group Policy makes strides in Windows Server 2008 R2
Quick tips for troubleshooting NTFS permissions
Common causes of Windows server security vulnerabilities
Cutting the cost of Windows identity and access management

Windows Management Instrumentation (WMI) Scripting
Windows scripting tutorials for systems administrators
Windows scripting secrets for disk quota management
Working with WMI providers to PowerShell
Customizing a mapped drive inventory
Vista's Windows kill switch: What to do if RFM kicks in
Why you should care about Windows PowerShell
Defrag script for all volumes
Christa Anderson's Scripting School for Windows administrators
Microsoft tool exposes WMI namespaces and properties
Microsoft utility helps admins diagnose WMI services

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts