Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ function step-install-expandwindowsimage {
try {
Write-Verbose -Message "[$(Get-Date -format s)] [$($MyInvocation.MyCommand.Name)] Running Expand-WindowsImage with parameters: $($Params | Out-String)"
Expand-WindowsImage @Params | Out-Null
New-Item -Path 'C:\Windows\Setup\Scripts' -ItemType Directory -Force | Out-Null
New-Item -Path 'C:\Windows\Setup\Scripts' -ItemType Directory -Force -ErrorAction Stop | Out-Null
# Create SetupComplete.cmd if it does not exist
$setupCompletePath = 'C:\Windows\Setup\Scripts\SetupComplete.cmd'
if (-not (Test-Path $setupCompletePath)) {
New-Item -Path $setupCompletePath -ItemType File -Force | Out-Null
New-Item -Path $setupCompletePath -ItemType File -Force -ErrorAction Stop | Out-Null
}
# Create SetupComplete.cmd
":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath $setupCompletePath -Append -Encoding ascii -Width 2000 -Force
":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath $setupCompletePath -Append -Encoding ascii -Width 2000 -Force -ErrorAction Stop
# Create OOBE.cmd
":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath 'C:\Windows\Setup\Scripts\OOBE.cmd' -Append -Encoding ascii -Width 2000 -Force
":: RecastOSDCloud $(Get-Date -format s)" | Out-File -FilePath 'C:\Windows\Setup\Scripts\OOBE.cmd' -Append -Encoding ascii -Width 2000 -Force -ErrorAction Stop
}
catch {
Write-Warning "[$(Get-Date -format s)] Expand-WindowsImage failed."
Expand Down
Loading