diff --git a/Scripts/0_DCHydrate.ps1 b/Scripts/0_DCHydrate.ps1 index e3b70fa2..dea0c3ca 100644 --- a/Scripts/0_DCHydrate.ps1 +++ b/Scripts/0_DCHydrate.ps1 @@ -159,6 +159,9 @@ function Hydrate-DC { New-item -type directory -Path "$mountdir\Windows\Panther" -force Copy-Item -Path $unattendfile -Destination "$mountdir\Windows\Panther\unattend.xml" -force Copy-Item -Path "$PSScriptRoot\Temp\DSC\*" -Destination "$mountdir\Program Files\WindowsPowerShell\Modules\" -Recurse -force + WriteInfoHighlighted "`t Adding Hyper-V feature into DC" + #Install Hyper-V feature + Enable-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V -Path "$mountdir" #Create credentials for DSC @@ -189,9 +192,9 @@ function Hydrate-DC { Import-DSCResource -ModuleName NetworkingDSC -ModuleVersion "9.0.0" Import-DSCResource -ModuleName xDHCPServer -ModuleVersion "3.1.1" Import-DSCResource -ModuleName xPSDesiredStateConfiguration -ModuleVersion "9.1.0" + Import-DSCResource -ModuleName xHyper-V -ModuleVersion "3.18.0" Import-DscResource -ModuleName PSDesiredStateConfiguration - Node $AllNodes.Where{$_.Role -eq "Parent DC"}.Nodename { @@ -229,12 +232,22 @@ function Hydrate-DC { DependsOn = "[WindowsFeature]ADDSInstall" } - WindowsFeature FeatureDNSTools + WindowsFeature Hyper-V-PowerShell { Ensure = "Present" - Name = "RSAT-DNS-Server" - DependsOn = "[WindowsFeature]ADDSInstall" - } + Name = "Hyper-V-PowerShell" + } + + xVMSwitch VMSwitch + { + Ensure = "Present" + Name = "vSwitch" + Type = "External" + AllowManagementOS = $true + NetAdapterName = "Ethernet" + EnableEmbeddedTeaming = $true + DependsOn = "[WindowsFeature]Hyper-V-PowerShell" + } ADDomain FirstDS { @@ -349,9 +362,11 @@ function Hydrate-DC { IPaddress IP { IPAddress = ($DhcpScope+"1/24") - AddressFamily = 'IPv4' - InterfaceAlias = 'Ethernet' + AddressFamily = "IPv4" + InterfaceAlias = "vEthernet (vSwitch)" + DependsOn = "[xVMSwitch]VMSwitch" } + WindowsFeature DHCPServer { Ensure = "Present" @@ -373,7 +388,6 @@ function Hydrate-DC { DependsOn = "[WindowsFeature]DHCPServer" } - xDhcpServerScope ManagementScope { Ensure = 'Present' diff --git a/Scripts/1_Prereq.ps1 b/Scripts/1_Prereq.ps1 index eada06ad..87823565 100644 --- a/Scripts/1_Prereq.ps1 +++ b/Scripts/1_Prereq.ps1 @@ -195,7 +195,7 @@ function Get-WindowsBuildNumber { #region Downloading required Posh Modules # Downloading modules into Temp folder if needed. - $modules=("ActiveDirectoryDsc","6.3.0"),("xDHCPServer","3.1.1"),("DnsServerDsc","3.0.0"),("NetworkingDSC","9.0.0"),("xPSDesiredStateConfiguration","9.1.0") + $modules=("ActiveDirectoryDsc","6.3.0"),("xDHCPServer","3.1.1"),("DnsServerDsc","3.0.0"),("NetworkingDSC","9.0.0"),("xPSDesiredStateConfiguration","9.1.0"),("xHyper-V","3.18.0") foreach ($module in $modules){ WriteInfoHighlighted "Testing if modules are present" $modulename=$module[0] diff --git a/Scripts/2_CreateParentDisks.ps1 b/Scripts/2_CreateParentDisks.ps1 index 62cd3bec..ba2a2ea5 100644 --- a/Scripts/2_CreateParentDisks.ps1 +++ b/Scripts/2_CreateParentDisks.ps1 @@ -321,17 +321,6 @@ If (-not $isAdmin) { VHDName="Win2022Core_G2.vhdx" Size=127GB } - }elseif ($BuildNumber -gt 20348 -and $SAC){ - $ServerVHDs += @{ - Kind = "Core" - Edition="2" - VHDName="WinSrvInsiderCore_$BuildNumber.vhdx" - Size=127GB - } - #DCEdition fix - if ($LabConfig.DCEdition -gt 2){ - $LabConfig.DCEdition=2 - } }elseif ($BuildNumber -eq 26100){ #Windows Server 2025 $ServerVHDs += @{ @@ -345,8 +334,19 @@ If (-not $isAdmin) { Edition="3" VHDName="Win2025Core_G2.vhdx" Size=127GB + } + }elseif ($BuildNumber -gt 26100 -and $SAC){ + $ServerVHDs += @{ + Kind = "Core" + Edition="2" + VHDName="WinSrvInsiderCore_$BuildNumber.vhdx" + Size=127GB + } + #DCEdition fix + if ($LabConfig.DCEdition -gt 2){ + $LabConfig.DCEdition=2 } - }elseif ($BuildNumber -gt 23100){ + }elseif ($BuildNumber -gt 26100){ #Windows Sever Insider $ServerVHDs += @{ Kind = "Full" diff --git a/Scripts/LabConfig.ps1 b/Scripts/LabConfig.ps1 index 0cefd31e..686f02f5 100644 --- a/Scripts/LabConfig.ps1 +++ b/Scripts/LabConfig.ps1 @@ -1,14 +1,12 @@ #basic config for Windows Server 2022, that creates VMs for S2D Hyperconverged scenario https://github.com/Microsoft/MSLab/tree/master/Scenarios/S2D%20Hyperconverged -$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'MSLab-' ; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()} +$LabConfig=@{AllowedVLANs="1-10,711-719" ; DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'MSLab-' ; DCEdition='4'; Internet=$true ; AdditionalNetworksConfig=@(); VMs=@()} # Windows Server 2022 -1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2022Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }} -# Or Azure Stack HCI 21H2 -#1..4 | ForEach-Object {$VMNames="AzSHCI"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI21H2_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 1GB }} -# Or Windows Server 2019 -#1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }} -# Or Windows Server 2025 -#1..4 | ForEach-Object {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2025Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }} +1..4 | ForEach-Object {$LABConfig.VMs += @{ VMName = "$S2D$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2022Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 512MB }} +# Or Azure Stack HCI 23H2 (non-domain joined) https://github.com/DellGEOS/AzureStackHOLs/tree/main/lab-guides/01a-DeployAzureStackHCICluster-CloudBasedDeployment +#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName = "ASNode$_" ; Configuration = 'S2D' ; ParentVHD = 'AzSHCI23H2_G2.vhdx' ; HDDNumber = 4 ; HDDSize= 2TB ; MemoryStartupBytes= 20GB; VMProcessorCount=16 ; vTPM=$true ; Unattend="NoDjoin" ; NestedVirt=$true }} +# Or Windows Server 2025 https://github.com/DellGEOS/AzureStackHOLs/tree/main/lab-guides/03-TestingWindowsServerInsider +#1..2 | ForEach-Object {$LABConfig.VMs += @{ VMName="S2D$_" ; Configuration='S2D' ; ParentVHD='WinSrvInsiderCore_26063.vhdx' ; HDDNumber=4 ; HDDSize=2TB ; MemoryStartupBytes=1GB; VMProcessorCount=4 ; vTPM=$true}} ### HELP ### diff --git a/Tools/CreateParentDisk.ps1 b/Tools/CreateParentDisk.ps1 index c1750e9d..68e4b548 100644 --- a/Tools/CreateParentDisk.ps1 +++ b/Tools/CreateParentDisk.ps1 @@ -174,8 +174,11 @@ If (-not $isAdmin) { 25398 { "AzSHCI23H2_G2.vhdx" } + 26100 { + "AzSHCI24H2_G2.vhdx" + } } - if ($BuildNumber -GT 25398){ + if ($BuildNumber -GT 26100){ $tempvhdname="AzSHCIInsider_$BuildNumber.vhdx" } }elseif (($Edition -like "*Server*Core*") -or ($Edition -like "Windows Server * Datacenter") -or ($Edition -like "Windows Server * Standard")){ @@ -216,8 +219,11 @@ If (-not $isAdmin) { 20348 { "Win2022Core_G2.vhdx" } + 26100 { + "Win2025Core_G2.vhdx" + } } - if ($BuildNumber -gt 20348){ + if ($BuildNumber -gt 26100){ $tempvhdname="WinSrvInsiderCore_$BuildNumber.vhdx" } }elseif($Edition -like "Hyper-V*"){ @@ -258,8 +264,11 @@ If (-not $isAdmin) { 20348 { "Win2022_G2.vhdx" } + 26100 { + "Win2025_G2.vhdx" + } } - if ($BuildNumber -GT 20348){ + if ($BuildNumber -GT 26100){ $tempvhdname="WinSrvInsider_$BuildNumber.vhdx" } }else{ @@ -312,8 +321,11 @@ If (-not $isAdmin) { 22621 { "Win1122H2_G2.vhdx" } + 26100 { + "Win1124H2_G2.vhdx" + } } - if ($BuildNumber -GT 22621){ + if ($BuildNumber -GT 26100){ $tempvhdname="Win11Insider_$BuildNumber.vhdx" } } diff --git a/Tools/DownloadLatestCUs.ps1 b/Tools/DownloadLatestCUs.ps1 index bd0533c8..fc28bff8 100644 --- a/Tools/DownloadLatestCUs.ps1 +++ b/Tools/DownloadLatestCUs.ps1 @@ -39,12 +39,14 @@ if ($version.Minor -eq 27){ } $Products=@() +$Products+=@{Product="Azure Stack HCI 24H2 and Windows Server 2025" ;SearchString="Cumulative Update for Microsoft server operating system version 24H2 for x64-based Systems" ;SSUSearchString=$null ; ID="Microsoft Server operating system-24H2"} $Products+=@{Product="Azure Stack HCI 23H2" ;SearchString="Cumulative Update for Microsoft server operating system version 23H2 for x64-based Systems" ;SSUSearchString=$null ; ID="Microsoft Server operating system-23H2"} #MSFT really removed the ',' in CUs $Products+=@{Product="Azure Stack HCI 22H2" ;SearchString="Cumulative Update for Microsoft server operating system version 22H2 for x64-based Systems" ;SSUSearchString=$null ; ID="Microsoft Server operating system-22H2"} $Products+=@{Product="Azure Stack HCI 21H2 and Windows Server 2022" ;SearchString="Cumulative Update for Microsoft server operating system version 21H2 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Microsoft server operating system version 21H2 for x64-based Systems" ; ID="Microsoft Server operating system-21H2"} $Products+=@{Product="Azure Stack HCI 20H2" ;SearchString="Cumulative Update for Azure Stack HCI, version 20H2" ;SSUSearchString="Servicing Stack Update for Azure Stack HCI, version 20H2 for x64-based Systems" ; ID="Azure Stack HCI"} #unsupported release SSU no longer required but remain for compat reasons $Products+=@{Product="Windows Server 2019" ;SearchString="Cumulative Update for Windows Server 2019 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows Server 2019 for x64-based Systems" ; ID="Windows Server 2019"} #SSU no longer required but remain for compat reasons $Products+=@{Product="Windows Server 2016" ;SearchString="Cumulative Update for Windows Server 2016 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows Server 2016 for x64-based Systems" ; ID="Windows Server 2016"} #SSU no longer required but remain for compat reasons +$Products+=@{Product="Windows 11 24H2" ;SearchString="Cumulative Update for Windows 11 Version 24H2 for x64-based Systems" ;SSUSearchString=$null ; ID="Windows 11"} $Products+=@{Product="Windows 11 23H2" ;SearchString="Cumulative Update for Windows 11 Version 23H2 for x64-based Systems" ;SSUSearchString=$null ; ID="Windows 11"} $Products+=@{Product="Windows 11 22H2" ;SearchString="Cumulative Update for Windows 11 Version 22H2 for x64-based Systems" ;SSUSearchString=$null ; ID="Windows 11"} $Products+=@{Product="Windows 10 21H2" ;SearchString="Cumulative Update for Windows 10 Version 21H2 for x64-based Systems" ;SSUSearchString="Servicing Stack Update for Windows 10 Version 21H2 for x64-based Systems" ; ID="Windows 10, version 1903 and later, Windows 10 LTSB"} #SSU no longer required but remain for compat reasons