shocked Posted January 20, 2014 Share Posted January 20, 2014 Hi All, To start, yes, I have googled and searched this forum. I am new to autoit, but I did find the user "water"'s "active directory" files and many other examples from contributors. My problem is, I just want to simply add the computer to a domain. If I turn on a new install of windows, all I need to do is click: Computer -> System Properties -> Advanced -> Computer Name Then I click the "to rename this computer or change its domain or workgroup" button. In the "member of domain" area, I type in the domain controller name. Then "ok". It immediately asks for the username and password, and, assuming I type them in correctly, it joins me to the domain. So, When looking at these autoit scripts to do the same thing.. they are full of questions about the ou, the domain controller, the domain, NetBIOS name, etc. Is there a simple way to just hard code in the domain controller name, and have it join and ask for the user/pw and be done? Quick and simple? I would also like to be able to change the computer name as well, but this can wait if it is a lot more work. Thank you in advance, Link to comment Share on other sites More sharing options...
water Posted January 20, 2014 Share Posted January 20, 2014 _AD_Open, _AD_CreateComputer, _AD_JoinDomain, _AD_Close should be sufficient. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
blckpythn Posted January 20, 2014 Share Posted January 20, 2014 You might also benefit from NetDom. Link to comment Share on other sites More sharing options...
shocked Posted January 20, 2014 Author Share Posted January 20, 2014 Hi Water/Everyone, Thank you for your reply. I have downloaded your AD suite. Since I am a newbie, I tried to just compile AD-Open and see what happens when I run that on the computer I want to join. I did and I get a popup error that says: Function _AD_Open encountered a problem. @error=4, @extended = -2147023541 I am not sure what that may mean I am doing wrong. Thank you for any thoughts. Link to comment Share on other sites More sharing options...
water Posted January 20, 2014 Share Posted January 20, 2014 Every function of the AD UDF comes with a help file. There you'll find a description for each error code. If you want to connect to the domain from a PC that isn't already connected to the domain then you need to pass 5 parameters. More description can be found in the wiki. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
shocked Posted January 20, 2014 Author Share Posted January 20, 2014 Water, Thank you for replying. I think it is possible that your AD scripts are a bit to advanced for me. I did read the docs. It is not (to me) intuitive at all. To join a computer to a domain, do I open AD_Open first? That seems silly, I would think AD_JoinDomain because that is what I need to do. Also, other scripts seem to ask for the parameters you are asking for.. but I have no idea where to put them.. or if I am somehow suppose to join the scripts with includes? Who knows.. and the wiki doesn't make that any easier for me. Looking at the code in the scripts, it appears it would ask me for the info via a prompt... I have been looking at this script: which for me (again, I am new) is very easy to understand. I see where to put params, etc. But, it says it is for XP and it is also asking for some ou= info which I don't normally need. Is there a simpler way to get this done without trying to learn how to connect a bunch of AD scripts? Thanks 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