Thanks!
So, i did this solution with ADO, but decided i didn't like that technology.
I started to write this in Winbatch + .NET, but decided maybe that was over doing what you had already written
I stumbled upon this Winbatch tech support article
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+Tutorials+ADSI.txtwhich appears to be a Extra info, more explanation, and some of the "why" behind the official Winbatch ADSI Extender.
In this article there is a paragraph (Emphasis Added by ME):
=== BEGIN SNIP OF ARTICLE ===
ADSI and COM
When the ADSI extender was written we really didn't have a feel for how people would use it. We opted to make it easy to use with as few steps as possible. We felt that it was the only way to give it some advantage over VBS or VB and COM. One way we did this was to remove the need save cached object changes to the Directory Service. The extender does this in the background every time you make a change to a property. While this makes ADSI a little less error prone and easier to use, it also adds a lot of network traffic. (With straight COM objects you have to tell ADSI to update the DS with your cached changes or they are lost.)
The problem is that the extender is prone to timing issues because of all the extra network traffic it generates. We may be making changes to the extender to work around this problem.
But right now I recommend using COM whenever possible.Sample code to get and set a user full name:
newname = "Fred Flintstone"
objUser = ObjectGet("WinNT://YourDomain/UserID")
origname = objUser.FullName
ret = AskYesNo('Change Users Full Name', StrCat('Are you sure you want to change the users full name from ',origname,' to ',newname,'?'))
If ret == @YES
objUser.FullName = "Users Name"
objUser.SetInfo()
EndIf
objUser = ""
Message('Changed Users Full Name', StrCat('Changed ',origname,' to ',newname))
Exit
Microsoft offers a tool called ADSI Scriptomatic. It is designed to help you write ADSI COM scripts; that is, scripts that can be used to manage Active Directory. The ADSI Scriptomatic also teaches you an important point about ADSI scripting: like WMI, there are consistent patterns to ADSI scripts.
http://www.microsoft.com/downloads/details.aspx?FamilyId=39044E17-2490-487D-9A92-CE5DCD311228&displaylang=en === END OF SNIP FROM ARTICLE ===
So is it still true that if time/skills/cost aside, using Winbatch + COM to call ADSI is preferred over Winbatch + Extender, unless simple is one of the primary goals of the code?
Aaron