Sysprep, K2000 and scripts...
Hi everyone,
i'm starting to get lost right now with K2000 and i may need your help.
I want to deploy some K-image ( software and personalisation included so ), sysprep used with a custom unattend.xml used. Where i'm stuck is : i can't name my computer when deploying the os. Next to this i want an automatic join on a specific domain and OU.
In all line : sysprep goes well, not the post task. Any idea ?
Answers (1)
I leave the computer name parameter out of the xml answer file so it will always prompt for name if you do not use the get/apply computer name tasks supplied with kace
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>XXXXXx</ComputerName>
http://www.itninja.com/blog/view/windows-7-image-process-for-the-college-s-classrooms
Comments:
-
it seems the default task for the get/set computername don't work. Keeps telling me " unable to open file ", and yes in the xml file i removed the line as well ;) - fantomasss 11 years ago
-
I use this get/set name
http://www.kace.com/support/resources/kb/article/Get-Set-ComputerName - SMal.tmcc 11 years ago-
do you have something for domain join and for specific OU ? - fantomasss 11 years ago
-
If the machine names are not already in Ad we create all of our machines in AD prior to imaging so we do not have to worry about OU placement.
You can use powershell in post to add to specific domain OU.
http://technet.microsoft.com/en-us/library/hh849798.aspx
We reimage twice a year and do not remove the old names just reuse them and have never had a problem yet.
I use the join_domain.vbs kace supplies in post script (I put the file in my images instead of downloading from the ikbox everytime)
This is the line I use in my post process.
start /wait cscript.exe -b c:\windows\w2d\join_domain.vbs Domain.name DomainUser password
for me:
start /wait cscript.exe -b c:\windows\w2d\join_domain.vbs tmccacad.tmcc.edu installer password
This is the script file:
Const JOIN_DOMAIN = 1
Const ACCT_CREATE = 2
Const ACCT_DELETE = 4
Const WIN9X_UPGRADE = 16
Const DOMAIN_JOIN_IF_JOINED = 32
Const JOIN_UNSECURE = 64
Const MACHINE_PASSWORD_PASSED = 128
Const DEFERRED_SPN_SET = 256
Const INSTALL_INVOCATION = 262144
If WScript.Arguments.Count < 3 or WScript.Arguments.Count > 4 Then
WScript.Quit
Else
strDomain = WScript.Arguments.Item(0)
strUser = WScript.Arguments.Item(1)
strPassword = WScript.Arguments.Item(2)
'set DNS IP address
If WScript.Arguments.Count = 4 Then
strDNSIP = WScript.Arguments.Item(3)
Set objShell = CreateObject("WScript.shell")
objShell.Run "netsh int ip set dns ""local area connection"" static "& _
strDNSIP &" primary",0,0
End If
End If
Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _
strComputer & _
"\root\cimv2:Win32_ComputerSystem.Name='" _
& strComputer & "'")
ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, _
strPassword, _
strDomain & "\" & strUser, _
NULL, _
JOIN_DOMAIN+ACCT_CREATE) - SMal.tmcc 11 years ago -
I can't use the same process like you as we can't reuse the same old name AND we don't have time to create the name before imaging. - fantomasss 11 years ago
Have you created a pre-installation task for the computer name? I'm assuming your deploying a Windows OS? - LBarclay 11 years ago