Sign in to follow this  
Followers 0
shocked

Join A Domain and Change Computer Name (windows 7)

6 posts in this topic

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,

Share this post


Link to post
Share on other sites



_AD_Open, _AD_CreateComputer, _AD_JoinDomain, _AD_Close should be sufficient.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

You might also benefit from NetDom.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0