File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -821,7 +821,7 @@ If (-not $isAdmin) {
821821 $unattendfile = CreateUnattendFileNoDjoin - ComputerName $Name - AdminPassword $LabConfig.AdminPassword - RunSynchronous $RunSynchronous - TimeZone $TimeZone
822822 }
823823 }elseif ($VMConfig.Win2012Djoin -or $VMConfig.Unattend -eq " DjoinCred" ){
824- WriteInfoHighlighted " `t Creating Unattend with win2012-ish domain join"
824+ WriteInfoHighlighted " `t Creating Unattend with credentials domain join"
825825 $unattendfile = CreateUnattendFileWin2012 - ComputerName $Name - AdminPassword $LabConfig.AdminPassword - DomainName $Labconfig.DomainName - RunSynchronous $RunSynchronous - TimeZone $TimeZone
826826
827827 }elseif ($VMConfig.Unattend -eq " DjoinBlob" -or -not ($VMConfig.Unattend )){
@@ -839,7 +839,9 @@ If (-not $isAdmin) {
839839 if ($unattendFile ){
840840 WriteInfo " `t Adding unattend to VHD"
841841 Mount-WindowsImage - Path $mountdir - ImagePath $VHDPath - Index 1
842- Use-WindowsUnattend - Path $mountdir - UnattendPath $unattendFile
842+ if ($VMConfig.Unattend -eq " DjoinBlob" ){
843+ Use-WindowsUnattend - Path $mountdir - UnattendPath $unattendFile
844+ }
843845 # &"$PSScriptRoot\Tools\dism\dism" /mount-image /imagefile:$vhdpath /index:1 /MountDir:$mountdir
844846 # &"$PSScriptRoot\Tools\dism\dism" /image:$mountdir /Apply-Unattend:$unattendfile
845847 New-item - type directory " $mountdir \Windows\Panther" - ErrorAction Ignore
You can’t perform that action at this time.
0 commit comments