sysboy Posted February 15, 2012 Posted February 15, 2012 Can you send me a copy for the scitp to add it to the domain? thanks
Michael Posted February 15, 2012 Posted February 15, 2012 You can copy/paste it from here. Just follow the notes and make the required changes for your domain/network.
sysboy Posted February 17, 2012 Posted February 17, 2012 I copy and your scipt by paste it into notpad and made the chnges to reflect my domain, username and password, but it did not work. it come back with an error code, Line 57. did anyone else get it to work? maybe you can send me a copy of the file to an email? anyway what to do. HELP!!
Michael Posted February 17, 2012 Posted February 17, 2012 Please bear in mind the script is for Windows 7 x86 (32Bit) only. If you're running Windows 7 x64 (64Bit) you need to create a slightly modified script using WAIK. I've used this script many times on many domains, so it does work
emenHX Posted February 20, 2012 Posted February 20, 2012 (edited) We use a PowerShell script We put a SetupComplete.cmd file in the C:\Windows\Setup\Scripts folder which then runs import.ps1 from the c:\windows\system32\sysprep\ folder the cmd also deletes the file as you don't want to leave any sensitive usernames or passwords on the C: drive jus in case. The script of the import.ps1 You need to change the parts in red to suit your environment. $User = "domain\user" $Pass = ConvertTo-SecureString "Password" -AsPlainText -Force $Credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,$Pass add-computer -domainname domainname.local -credential $Credentials If you remove the ComputerName part the xml will wait for computer name as it sets up Hi, I am doing the same thing here. But what I really like to do is to add the computers to a specific OU but I get the following error, wonder if anyone can over look the script or suggest a solution? also posted on technet forums but no reply so far(I will post any updates from there over here) The script is : $username = "domain\Admin" $password = ConvertTo-SecureString "password" -AsPlainText -Force $myCred = New-Object System.Management.Automation.PSCredential $username, $password Add-Computer -DomainName domain.com -Credential $mycred -OUPath “OU=OUtest-VMs,OU=OUComputers,DC=domain,DC=com” Output 2 (intentionally made a computer account in AD to check FQDN) skip to Output 1 below: PS C:\Windows\system32> C:\addcomputer.ps1 Add-Computer : This command cannot be executed on target computer('PC-TEMP2') due to following error: The account already exists. At C:\addcomputer.ps1:5 char:13 + Add-Computer <<<< -DomainName domain.com -Credential $mycred -OUPath “OU=OUtest-VMs,OU=OUComputers,DC=domain,DC=com” + CategoryInfo : InvalidOperation: (PC-TEMP2:String) [Add-Computer], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.AddComputerCommand Output 1 (actual problem) with error : The system cannot find the file specified. what does this mean? note that I changed the PC name, replication is a Bi*** here! PS C:\Windows\system32> C:\addcomputer.ps1 Add-Computer : This command cannot be executed on target computer('PC-TEMP3') due to following error: The system cannot find the file specified. At C:\addcomputer.ps1:5 char:13 + Add-Computer <<<< -DomainName domain.com -Credential $mycred -OUPath “OU=OUtest-VMs,OU=OUComputers,DC=domain,DC=com” + CategoryInfo : InvalidOperation: (PC-TEMP3:String) [Add-Computer], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.AddComputerCommand Edited February 20, 2012 by emenHX formating
Michael Posted February 20, 2012 Posted February 20, 2012 You could just pre-create the Computer Objects in the right OU in the first place. When a workstation is added to the domain with the same name, it's instantly in the right place.
emenHX Posted February 20, 2012 Posted February 20, 2012 You could just pre-create the Computer Objects in the right OU in the first place. When a workstation is added to the domain with the same name, it's instantly in the right place. Hey Michael, That's what I'm trying to avoid. Without the -OUpath syntax it will join the machine to domain to an existing computer account but I do not want to pre-create accounts in AD. Running powershell as a administrator, with unrestricted ExecutionPolicy, testing the addcomputer.ps1 manually with the -OUpath syntax and I get the system cannot find the file specified. If there is no solution than I guess I have to do just that that brings up the question is -OUpath syntax broken? Has it worked for others out there?
emenHX Posted February 21, 2012 Posted February 21, 2012 Hey Michael, That's what I'm trying to avoid. Without the -OUpath syntax it will join the machine to domain to an existing computer account but I do not want to pre-create accounts in AD. Running powershell as a administrator, with unrestricted ExecutionPolicy, testing the addcomputer.ps1 manually with the -OUpath syntax and I get the system cannot find the file specified. If there is no solution than I guess I have to do just that that brings up the question is -OUpath syntax broken? Has it worked for others out there? Guess what! my DN path was missing an OU name(confirmed with DSquery...) the -OUpath syntax works now, I'm loving it
agarabaghi Posted May 3, 2012 Posted May 3, 2012 So I was having good luck with vbs script posted on the 1st page of this thread. But now im getting this error joining the domain. Error Joing Domain Error Code = 0 why would this be happening now?
satn Posted May 9, 2012 Posted May 9, 2012 Hello Sorry for my english i'am french. I have a problem in fact i use myspsprep and your unattend.xml but i have a problem. When i capture an image i have the pop_up who ask me the name of my new computer after reboot. But when i deploy with my capture's image i don't have . Can you help me please. Thanks
Michael Posted May 15, 2012 Posted May 15, 2012 I'm not sure what's going on there. What software are you using to capture the image?
Michael Posted May 15, 2012 Posted May 15, 2012 Have you Sysprepped your master image more than three times before capture?
agarabaghi Posted May 15, 2012 Posted May 15, 2012 you could try using the mysysprep tool instead of the ms sysprep... i find it works a little better for naming the machines. I have it set ti %SerialNo% and it pulls the machines serial from the bios. http://www.tsaysoft.com/mysysprep2/
agarabaghi Posted May 15, 2012 Posted May 15, 2012 Have you Sysprepped your master image more than three times before capture? When you say have you sysprep'ed your masterimage 3 times what do you mean? running the sysprep /generalize /audit /reboot command, or rebooting while in sysprep mode?
agarabaghi Posted May 15, 2012 Posted May 15, 2012 hmm try remaking your unattend file? im not sure ive run into weird issues and i jsut start over haha
satn Posted May 15, 2012 Posted May 15, 2012 (edited) 3 times rebooting in sysprep mode i run mysysprep /generalize /oobe /unattend:C:\Windows\system32\sysprep\unattend.xml with fr-FR fr-FR en-US fr-FR fr-FR true Work 1 dwBlAGwAYwBvAG0AZQBQAGEAcwBzAHcAbwByAGQA false Local User Admin administrators Admin GMT Standard Time Centretrhyzeh Centre ezthheh false Txxxxxxxx %Nom du Pc% Centre yetheh Centre hzee-hg false GMT Standard Time CH-ES.NET administrateur xxxxxxx CH-ES.NET Edited May 15, 2012 by satn
satn Posted May 15, 2012 Posted May 15, 2012 i think because my image is working. when i deploy my image's capture after the sysprep and the capture, myssysprep ask me the name of my computer. But when i deploy on an other computer it didn't
Michael Posted May 15, 2012 Posted May 15, 2012 can mysysprep do french language? The language isn't the problem. Other than specifying 'FR' it's the same code. i think because my image is working. when i deploy my image's capture after the sysprep and the capture, myssysprep ask me the name of my computer. But when i deploy on an other computer it didn't So if it doesn't prompt you for a name, what exactly happens if you leave it? Does it just boot into Windows? Does the Sysprep process run?
satn Posted May 15, 2012 Posted May 15, 2012 Yes it just boot into windows. i don't know if sysprep process run i am checking
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