File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change
1
+ Param (
2
+ [switch ]$InstallCloudbaseInit
3
+ )
1
4
$ErrorActionPreference = " Stop"
2
5
3
6
Get-WUInstall - AcceptAll - IgnoreReboot
9
12
{
10
13
Remove-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" - Name Unattend*
11
14
Remove-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" - Name AutoLogonCount
12
- Start-Process - FilePath msiexec - ArgumentList " /i C:\Windows\Temp\CloudbaseInitSetup.msi /qn /l*v C:\Windows\Temp\CloudbaseInitSetup_Beta.log" - Wait
13
- C:\Windows\System32\Sysprep\Sysprep.exe / generalize / oobe / shutdown / unattend:C:\Windows\Temp\Unattend.xml
15
+ if ($InstallCloudbaseInit )
16
+ {
17
+ Start-Process - FilePath msiexec - ArgumentList " /i C:\Windows\Temp\CloudbaseInitSetup.msi /qn /l*v C:\Windows\Temp\CloudbaseInitSetup_Beta.log" - Wait
18
+ C:\Windows\System32\Sysprep\Sysprep.exe / generalize / oobe / shutdown / unattend:C:\Program\ Files\ (x86)\Cloudbase\ Solutions\Cloudbase- Init\conf\Unattend.xml
19
+ }
20
+ else
21
+ {
22
+ C:\Windows\System32\Sysprep\Sysprep.exe / generalize / oobe / shutdown / unattend:C:\Windows\Temp\Unattend.xml
23
+ }
14
24
}
You can’t perform that action at this time.
0 commit comments