HeinWupp Posted January 3, 2009 Share Posted January 3, 2009 (edited) Hi there,is it possible in AutoIt to add a global to a local group in an Active Directory environment?I'm already using the UDF library "adfunctions.au3" but there's only a function "_ADAddUserToGroup" which will add an user to a group. This function IMHO isn't able to add groups to other groups.If I use the Active Directory Console it is possible to add global groups to local groups. How can I implement this in AutoIt?The only useful thing my friend Google found is this: http://www.visualbasicscript.com/m_26817/tm.htmBut unfortunately this example is written in VBS and I'm not very experienced in VBS. Can anybody translate it to AutoIt or help me in another way?Any help appreciated! TIA!HeinWupp Edited January 3, 2009 by HeinWupp Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 4, 2009 Share Posted January 4, 2009 (edited) Hi there, is it possible in AutoIt to add a global to a local group in an Active Directory environment? I'm already using the UDF library "adfunctions.au3" but there's only a function "_ADAddUserToGroup" which will add an user to a group. This function IMHO isn't able to add groups to other groups. If I use the Active Directory Console it is possible to add global groups to local groups. How can I implement this in AutoIt? The only useful thing my friend Google found is this: http://www.visualbasicscript.com/m_26817/tm.htm But unfortunately this example is written in VBS and I'm not very experienced in VBS. Can anybody translate it to AutoIt or help me in another way? Any help appreciated! TIA! HeinWupp Happy New Year: Global $sDomain = "Domain_Name" Global $sGlobalGroup = "Global_Group_Name" Global $sLocalGroup = "Local_Group_Name" Global $sComputer = @ComputerName Global $oDomainGroup = ObjGet("WinNT://" & $sDomain & "/" & $sGlobalGroup & ",group") Global $oLocalAdmGroup = ObjGet("WinNT://" & $sComputer & "/" & $sLocalGroup & ",group") $oLocalAdmGroup.Add($oDomainGroup.AdsPath) $oLocalAdmGroup.SetInfo Edit: Made it cleaner. Edited January 4, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
HeinWupp Posted January 9, 2009 Author Share Posted January 9, 2009 Hi Psalty, hey, that's exactly what I've been searching for! Works fine - also with my trusted Active Directorys! Many thanks! Greetings from cold and snowy Germany HeinWupp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now