File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
HandsOnLabs/01-CreatingFirstLab Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,12 @@ Note: Start-BitsTransfer is used because invoke-webrequest is slow for big files
6262``` PowerShell
6363#ISO
6464$WindowsServerEvalURL="https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26100.1742.240906-0331.ge_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso"
65- $AzureLocal2505URL="http://aka.ms/hcireleaseimage/2505"
65+ #you should download latest image from Azure Portal, this is just an example
66+ $AzureLocal2509URL="http://aka.ms/hcireleaseimage/2509"
6667
6768#download
6869Start-BitsTransfer -Source $WindowsServerEvalURL -Destination $env:userprofile\Downloads\
69- Start-BitsTransfer -Source $AzureLocal2505URL -Destination $env:userprofile\Downloads\AzureLocal2505 .iso
70+ Start-BitsTransfer -Source $AzureLocal2509URL -Destination $env:userprofile\Downloads\AzureLocal2509 .iso
7071
7172```
7273
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