I have a joindomain tool as well based somewhat from the above code.

I have recently been granted a "service acct" for joining computers and our naming convention has been changed to serno = @wksta, I can "automate" it...

I have an IP subnet detection feature to select the default OU and am also making a GPO to run the script on all PCs in the default "Computers" container... for the lazy IT staff that don't put the PCs into the correct OUs.
_________________________
How to ask questions the smart way <-----------> Before you ask