Wolfteeth Posted January 29, 2010 Posted January 29, 2010 How @comSpec run in administrator under Win7? I previoulsy made a script to join xp to domain with no any problems. the script is built as Joindomain.exe however, when I want to run Joindomain.exe in win7, I found would get error 1326 which is said unkonwn user name and passwrd even I ran the Joindomain.exe in administrator mode. of course, I certain ensure the password input is correct. I believe the problem is caused by that WIN7 requires administroat previliege to perform @comSpec, as I actually ran joindomain.exe in administrator, but @comspect does not. I see there's powershell to join domain in win7 but I still prefer netdom approach, and autoit script in gui, not sure if theres anybody who have any suggestions/comments can bypass this authentication issues for new session in @comspec... $JoinadCmdLine = @ComSpec & " /c netdom.exe Move " & @ComputerName & " /Domain:contoso.com /ou:ou="&$OU1&",dc=contoso,dc=com /ud:contoso\"&$domainID&" /pd:"&$domainPW&" /uo:" & @computername &"\"&$LocalID&" /po:"&$LocalPW&" /verbose /reboot:15" Run($JoinadCmdLine, "", @SW_HIDE)
somdcomputerguy Posted January 29, 2010 Posted January 29, 2010 Maybe use this function? RunAs - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
mhullnc Posted April 7, 2010 Posted April 7, 2010 I am going through some similar paing. Netdom is no longer supported in vista and Windows 7. There are some problems with add-computer from powershell. Mainly in dealing with specifying a password for the domain join. You will at best need to find a non netdom approach. Whoever said change is good never tried to script Windows 7 domain migrations.
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