Skip to content

Commit 9ca9873

Browse files
committed
Moves WinRM config to Unattend.xml
1 parent ac95f77 commit 9ca9873

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

Autounattend.xml

+1-13
Original file line numberDiff line numberDiff line change
@@ -190,21 +190,9 @@
190190
<Description>Execute tools deployment script</Description>
191191
</RunSynchronousCommand>
192192

193-
<!-- WinRM configuration -->
194-
<RunSynchronousCommand wcm:action="add">
195-
<Order>5</Order>
196-
<Path>powershell -NoLogo -Command "Invoke-WebRequest -Uri https://raw.github.com/cloudbase/unattended-setup-scripts/master/SetupWinRMAccess.ps1 -OutFile C:\Windows\Temp\SetupWinRMAccess.ps1"</Path>
197-
<Description>Download WinRM setup script</Description>
198-
</RunSynchronousCommand>
199-
<RunSynchronousCommand wcm:action="add">
200-
<Order>6</Order>
201-
<Path>powershell -NoLogo -ExecutionPolicy RemoteSigned -File C:\Windows\Temp\SetupWinRMAccess.ps1</Path>
202-
<Description>Execute WinRM setup script</Description>
203-
</RunSynchronousCommand>
204-
205193
<!-- Comment the following if you don't need VMWare tools -->
206194
<RunSynchronousCommand wcm:action="add">
207-
<Order>7</Order>
195+
<Order>5</Order>
208196
<Path>E:\setup64.exe /s /v "/qn REBOOT=ReallySuppress" /l C:\Windows\Temp\vmware_tools_install.log</Path>
209197
<Description>Install VMWare tools</Description>
210198
<WillReboot>Always</WillReboot>

Unattend.xml

+23
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
<SkipMachineOOBE>true</SkipMachineOOBE>
1818
<SkipUserOOBE>true</SkipUserOOBE>
1919
</OOBE>
20+
<UserAccounts>
21+
<AdministratorPassword>
22+
<Value>Passw0rd</Value>
23+
<PlainText>true</PlainText>
24+
</AdministratorPassword>
25+
</UserAccounts>
2026
</component>
2127
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
2228
<OOBE>
@@ -28,4 +34,21 @@
2834
</OOBE>
2935
</component>
3036
</settings>
37+
<settings pass="specialize">
38+
<component name="Microsoft-Windows-Deployment" 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">
39+
<RunSynchronous>
40+
<!-- WinRM configuration -->
41+
<RunSynchronousCommand wcm:action="add">
42+
<Order>1</Order>
43+
<Path>powershell -NoLogo -Command "Invoke-WebRequest -Uri https://raw.github.com/cloudbase/unattended-setup-scripts/master/SetupWinRMAccess.ps1 -OutFile C:\Windows\Temp\SetupWinRMAccess.ps1"</Path>
44+
<Description>Download WinRM setup script</Description>
45+
</RunSynchronousCommand>
46+
<RunSynchronousCommand wcm:action="add">
47+
<Order>2</Order>
48+
<Path>powershell -NoLogo -ExecutionPolicy RemoteSigned -File C:\Windows\Temp\SetupWinRMAccess.ps1</Path>
49+
<Description>Execute WinRM setup script</Description>
50+
</RunSynchronousCommand>
51+
</RunSynchronous>
52+
</component>
53+
</settings>
3154
</unattend>

0 commit comments

Comments
 (0)