Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromirk committed Sep 27, 2021
1 parent 4247de1 commit 64b3253
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Scenarios/AzSHCI and MDT/LabConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ $LabConfig=@{<#SwitchNics="NIC1","NIC2";#> DomainAdminName='LabAdmin'; AdminPass
#MDT machine (GUI is needed as Core does not have WDSUtil)
$LabConfig.VMs += @{ VMName = 'MDT' ; Configuration = 'S2D' ; ParentVHD = 'Win2022_G2.vhdx' ; SSDNumber = 1; SSDSize=1TB ; MGMTNICs=1 }

#Management machine
$LabConfig.VMs += @{ VMName = 'Management' ; ParentVHD = 'Win2022_G2.vhdx' ; MGMTNICs=1 }

#optional Windows 11 machine for management
$LabConfig.VMs += @{ VMName = 'Win11' ; ParentVHD = 'Win1121H2_G2.vhdx' ; MGMTNICs=1}
#$LabConfig.VMs += @{ VMName = 'Win11' ; ParentVHD = 'Win1121H2_G2.vhdx' ; MGMTNICs=1}

11 changes: 6 additions & 5 deletions Scenarios/AzSHCI and MDT/Scenario.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@
New-Item -Path $using:DeploymentShareLocation -ItemType Directory -ErrorAction Ignore
New-SmbShare -Name "DeploymentShare$" -Path "$using:DeploymentShareLocation" -FullAccess Administrators
}
Start-Sleep 5
#map MDT deployment share as PSDrive
New-PSDrive -Name "DS001" -PSProvider "MDTProvider" -Root "\\$MDTServer\DeploymentShare$" -Description "MDT Deployment Share" -NetworkPath "\\$MDTServer\DeploymentShare$" -Verbose | add-MDTPersistentDrive -Verbose

#sometimes happens that script to complains: The process cannot access the file '\\MDT\DeploymentShare$\Control\Settings.xml' because it is being used by another process.
do{
New-PSDrive -Name "DS001" -PSProvider "MDTProvider" -Root "\\$MDTServer\DeploymentShare$" -Description "MDT Deployment Share" -NetworkPath "\\$MDTServer\DeploymentShare$" -Verbose | add-MDTPersistentDrive -Verbose
}until (get-psdrive -Name DS001)
#Configure SQL Services

Invoke-Command -ComputerName $MDTServer -scriptblock {
Expand Down Expand Up @@ -888,8 +889,8 @@ foreach ($idrac_ip in $idrac_ips){
#in real world scenairos you can have hash table like this:
<#
$HVHosts = @()
$HVHosts+=@{ComputerName="AxNode1" ;IPAddress="10.0.0.120" ; MACAddress="0C:42:A1:DD:57:DD" ; GUID="4C4C4544-004D-5410-8031-B4C04F373733"}
$HVHosts+=@{ComputerName="AxNode2" ;IPAddress="10.0.0.121" ; MACAddress="0C:42:A1:DD:57:C9" ; GUID="4C4C4544-004D-5410-8033-B4C04F373733"}
$HVHosts+=@{ComputerName="AxNode1" ;IPAddress="10.0.0.120" ; MACAddress="0C:42:A1:DD:57:DC" ; GUID="4C4C4544-004D-5410-8031-B4C04F373733"}
$HVHosts+=@{ComputerName="AxNode2" ;IPAddress="10.0.0.121" ; MACAddress="0C:42:A1:DD:57:C8" ; GUID="4C4C4544-004D-5410-8033-B4C04F373733"}
#>

#grab machines that attempted to boot in last 5 minutes and create hash table.
Expand Down

0 comments on commit 64b3253

Please sign in to comment.