Sign in to follow this  
Followers 0
whowd

Joindomain Tool

25 posts in this topic

Here is a utility to help users joining a computer to an Active Directory domain. It provides similiar functionality to the netdom.exe utility in that it was designed to allow you to specify an OU (organizational unit) when you're joining the domain.

Download:

http://www2.truman.edu/~whowd/blog/2006/05...omain-tool.html

Requirements:

Latest Beta version of AutoIT

Screenshot:

Posted Image

Share this post


Link to post
Share on other sites



Welcome to The Forums...

Very, Very nice for a first post!

We look forward to GREATness from you!!

Valuater

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

nice, a couple of suggestions tho

instead of hard coding the user name and password in, maybe something like:

$adUsername     = InputBox("User","Admin Name:")
If @error Then Exit
$adPassword     = InputBox("Password","Admin Password",'','*')
If @error Then Exit

an enhancement also would be to have an ini file for other vars that would need to be different on other networks such as $adDefaultContext, $adDomainController, $adDomain

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Very nice script, I can tell you put a lot of work into this.

A couple of suggestions:

  • Have an option for it to prompt for a computer name, rather than using the one currently assigned.
  • Have an option for it to prompt for the username and password, for security reasons.
Edit: was a little slow on the second suggestion Edited by big_daddy

Share this post


Link to post
Share on other sites

Thanks for all the feedback. I did a minor update to this script that will let it prompt you for the credentials (username and password) if they are not hardcoded.

I believe in most enviroments the Active Directory structure would be fairly simple (small forest, one domain, etc) so adding in support for more complicated enviroments might be overkill and might confuse the average user. If someone needs to support multiple configurations, it should be easy enough to compile a few different versions of the script.

Download Version 1.1:

http://www2.truman.edu/~whowd/blog/2006/05...omain-tool.html

Share this post


Link to post
Share on other sites

Wonderful work, my compliments.

I have a little problem with line 279 and I am certain it has to do with how my domain is laid out.

I receive this error at:

$treeIDArray[$treeID] = $fullOU

^ =Array variable has incorrect number of sub scripts or subscript dimension range exceeded.

Share this post


Link to post
Share on other sites

thats cuz u need the latest beta, but wow very nice for a first post amazing what people can do if they READ the helpfile and look at examples on the forum

Share this post


Link to post
Share on other sites

I upgraded from beta version 3.1.1.104 to 3.1.1.122 and generated the exact same error at line 279.

$treeIDArray[$treeID] = $fullOU

^ =Array variable has incorrect number of sub scripts or subscript dimension range exceeded.

Perhaps you might have another idea.

Share this post


Link to post
Share on other sites

Do you see the TreeView start to populate with your OU's?

Try changing the "2" in line 240 to a "4" and see if that helps your problem.

From:

Dim $treeIDArray[uBound($reversedAllOUsArray)*2]

To:

Dim $treeIDArray[uBound($reversedAllOUsArray)*4]

Share this post


Link to post
Share on other sites

This is a very cool script and I am trying to use it at my work.

However, I keep getting a $joinDomainResult = 1355 which I looked up and found this: 1355 Error Which means failure to find or connect to a domain controller. But the weird thing is that is finds/queries the Domain controller fine. Can anyone help ? Thanks

Share this post


Link to post
Share on other sites

This is a very cool script and I am trying to use it at my work.

However, I keep getting a $joinDomainResult = 1355 which I looked up and found this: 1355 Error Which means failure to find or connect to a domain controller. But the weird thing is that is finds/queries the Domain controller fine. Can anyone help ? Thanks

Nevermind, I figured it out :lmao:

Share this post


Link to post
Share on other sites

One of the best and most useful scripts I have seen in a very long time! GREAT work!!!

Share this post


Link to post
Share on other sites

Nice work dear :whistle: everything worked fine with me , but when i clicke Join Domain it gives me below error:

MsgBox(0, "Domain Join Failed (" & $joinDomainResult & ")", "I wasn't able to join the domain successfully." & @LF & @LF & _

$joinDomainResultText)

MsgBox(0, "Domain Join Failed (" & $joinDomainResult & ")", "I wasn't able to join the domain successfully." & @LF & @LF &

^Error

Error: Variable used without being declared.

how can i fix that?

Share this post


Link to post
Share on other sites

does anyone know if there is a way to change the code so that it will only list one or two ou's within our ad network. at this time we have about 20 groups setup in our ad and i dont want the desktop tech to see them all. i would like for this to just list one group example: workstations but not servers, maybe just laptop and desktops. thanks for your help all..

d@ve

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

i was reading through my post and thought maybe i should try and make this more clear. i would like to just list one organizational unit within our ou. useing an example from the above image, once i login in i would like to only see "Academic Divisions" and then any group listed below it. i dont want to be able to see "Academic Affairs" or "Advancement" or "Bussiness Office". thank you...

d@ve

Edited by surreal

Share this post


Link to post
Share on other sites

i go it...

all i needed to change is...

$adDefaultContext = "OU=Academic Divisions,DC=Domain,DC=COM"

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Does anyone know how to put the full domain controller string?

For example:

Right now I have the following:

$adDefaultContext = "DC=ca,DC=test,DC=com"

$adDomainController = "ca.test.com"

$adDomain = "CA"

If it was accessed within the network, then CA would work fine but if I were to add another computer to the domain through another computer I would need to put ca.test.com but unfornuately I couldn't get it to work.

Does anyone know how I can modify it to do that?

Thanks,

Jeff

Edited by Jeff146

Share this post


Link to post
Share on other sites

Very nice script, I can tell you put a lot of work into this.

A couple of suggestions:

  • Have an option for it to prompt for a computer name, rather than using the one currently assigned.
  • Have an option for it to prompt for the username and password, for security reasons.
Edit: was a little slow on the second suggestion

Hi!!!

Any updates related to big_daddy's suggestion to Have an option for it to prompt for a computer name, rather than using the one currently assigned?

I need this also. Hope you can help.

Thanks in adv.

Pinoyz

Share this post


Link to post
Share on other sites

The original poster most likely isn't going to respond. His last post was May 5th 2006. Besides, the changes that you need are very simple.

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