From 52bc650252a856cf85bbf2abe46e00074b6e8739 Mon Sep 17 00:00:00 2001 From: jaromirk Date: Tue, 22 Mar 2022 21:45:10 +0100 Subject: [PATCH 1/5] 1h token expiry -> 10h token expiry --- Scenarios/AzSHCI and AVD/Scenario.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scenarios/AzSHCI and AVD/Scenario.ps1 b/Scenarios/AzSHCI and AVD/Scenario.ps1 index e2a20294..ba5809eb 100644 --- a/Scenarios/AzSHCI and AVD/Scenario.ps1 +++ b/Scenarios/AzSHCI and AVD/Scenario.ps1 @@ -163,7 +163,7 @@ $imageOSDisk = @{Id = $ImageVersionID} $OSDiskConfig = New-AzDiskConfig -Location $HostPoolLocation -CreateOption "FromImage" -ImageReference $imageOSDisk New-AzDisk -ResourceGroupName $AVDResourceGroupName -DiskName $ManagedDiskName -Disk $OSDiskConfig - $output=Grant-AzDiskAccess -ResourceGroupName $AVDResourceGroupName -DiskName $ManagedDiskName -Access 'Read' -DurationInSecond 3600 + $output=Grant-AzDiskAccess -ResourceGroupName $AVDResourceGroupName -DiskName $ManagedDiskName -Access 'Read' -DurationInSecond 36000 #10 hours $SAS=$output.accesssas #Start-BitsTransfer -Source $SAS -Destination "\\$ClusterName\ClusterStorage$\$LibraryVolumeName\$SKU.vhd" #download using AzCopy as it's faster than bits transfer. But it cannot be downloaded directly to CSV From 3c14913ef70e820b5ae3671b0ef2c005e4584b2d Mon Sep 17 00:00:00 2001 From: jaromirk Date: Tue, 29 Mar 2022 15:14:32 +0200 Subject: [PATCH 2/5] PAL removed --- Scenarios/AzSHCI Deployment/Scenario.ps1 | 98 ------------------------ 1 file changed, 98 deletions(-) diff --git a/Scenarios/AzSHCI Deployment/Scenario.ps1 b/Scenarios/AzSHCI Deployment/Scenario.ps1 index 857b4d68..9a4dc4d3 100644 --- a/Scenarios/AzSHCI Deployment/Scenario.ps1 +++ b/Scenarios/AzSHCI Deployment/Scenario.ps1 @@ -1050,104 +1050,6 @@ start-sleep 10 #endregion -#region (optional) register your Dell partner ID to your Azure Subscription https://docs.microsoft.com/en-us/partner-center/link-partner-id-for-azure-performance-pal-dpor -if ($DellHW){ - #define list of Location PAL IDs - $CSV=@" - Argentina;1973856 - Australia;1576776 - Austria;1444496 - Belgium;1447258 - Brazil;1563635 - Canada;742767 - Chile;2389235 - China;2580218 - Colombia;1736279 - Czech Republic;1980606 - Denmark;1449600 - Egypt;6462248 - Finland;1993462 - France;892181 - Germany;1449416 - Greece;3679221 - Hong Kong Sar;2790298 - India;2419713 - Indonesia;2834572 - Ireland;1447272 - Israel;6462253 - Italy;1446223 - Japan;578508 - Korea;2153293 - Luxembourg;6462292 - Malaysia;2731874 - Mexico;724848 - Morocco;6462283 - Netherlands;1446198 - New Zealand;1872429 - Norway;1446238 - Pakistan;6462648 - Panama;1477223 - Peru;6466758 - Poland;3697305 - Portugal;1552205 - Romania;1735552 - Russia;4543982 - Singapore;2773797 - Slovakia;3812320 - South Africa;1970176 - Spain;1004323 - Sweden;1449417 - Switzerland;1449592 - Taiwan;5097219 - Thailand;2345177 - Turkey;3396579 - United Arab Emirates;3159758 - United Kingdom;1447267 - United States;913990 -"@ - $Header = 'Country', 'LocationID' - $PALIDs=ConvertFrom-Csv -Delimiter ";" -InputObject $CSV -Header $Header - - #Install Azure packages - Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force - $ModuleNames="Az.Accounts","Az.Resources","Az.ManagementPartner" - foreach ($ModuleName in $ModuleNames){ - if (!(Get-InstalledModule -Name $ModuleName -ErrorAction Ignore)){ - Install-Module -Name $ModuleName -Force - } - } - - #login to Azure (if not logged in already) - if (-not (Get-AzContext)){ - Login-AzAccount -UseDeviceAuthentication - } - - $RegistrationInfo=Get-AzManagementPartner -ErrorAction Ignore - <# - if ($RegistrationInfo -eq $null){ - Write-Host "Partner registration not found" -ForegroundColor Red - }else{ - Write-Host "Following partner registration found:" -ForegroundColor Green - $RegistrationInfo - } - #> - - #Select location - $LocationID=$PALIDs | Out-GridView -Title "Please select location ID" -OutputMode Single - - #register new partner - if ($RegistrationInfo){ - Update-AzManagementPartner -PartnerId $LocationID.LocationID - }else{ - New-AzManagementPartner -PartnerId $LocationID.LocationID - } - - #remove - #$RegistrationInfo=Get-AzManagementPartner - #Remove-AzManagementPartner -PartnerID $RegistrationInfo.PartnerID -} -#endregion - #region (optional - just an example) Create some VMs (3 per each CSV disk) https://github.com/Microsoft/WSLab/tree/master/Scenarios/S2D%20and%20Bulk%20VM%20creation Start-Sleep -Seconds 60 #just to a bit wait as I saw sometimes that first VMs fails to create if ($realVMs -and $VHDPath){ From 3580cc897b46845310e414bcaeef834ac69358a8 Mon Sep 17 00:00:00 2001 From: jaromirk Date: Thu, 31 Mar 2022 11:57:20 +0200 Subject: [PATCH 3/5] new AzSHCI URI --- Scenarios/AzSHCI and MDT/Scenario.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scenarios/AzSHCI and MDT/Scenario.ps1 b/Scenarios/AzSHCI and MDT/Scenario.ps1 index 9ada12c0..9ff96bbe 100644 --- a/Scenarios/AzSHCI and MDT/Scenario.ps1 +++ b/Scenarios/AzSHCI and MDT/Scenario.ps1 @@ -34,7 +34,7 @@ $Files+=@{Uri="https://go.microsoft.com/fwlink/?linkid=2166133" ; FileName="adkwinpesetup.exe" ; Description="WindowsPE for Windows 11 21H2"} $Files+=@{Uri="https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi" ; FileName="MicrosoftDeploymentToolkit_x64.msi" ; Description="Microsoft Deployment Toolkit"} #$Files+=@{Uri="https://software-download.microsoft.com/download/pr/AzureStackHCI_17784.1408_EN-US.iso" ; FileName="AzureStackHCI_17784.1408_EN-US.iso" ; Description="Azure Stack HCI ISO"} - $Files+=@{Uri="https://software-download.microsoft.com/download/sg/AzureStackHCI_20348.288_en-us.iso" ; FileName="AzureStackHCI_20348.288_en-us.iso" ; Description="Azure Stack HCI ISO"} + $Files+=@{Uri="https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/AzureStackHCI_20348.587_en-us.iso" ; FileName="AzureStackHCI_20348.587_en-us.iso" ; Description="Azure Stack HCI ISO"} $Files+=@{Uri="https://go.microsoft.com/fwlink/?linkid=866658" ; FileName="SQL2019-SSEI-Expr.exe" ; Description="SQL Express 2019"} #$Files+=@{Uri="https://aka.ms/ssmsfullsetup" ; FileName="SSMS-Setup-ENU.exe" ; Description="SQL Management Studio"} foreach ($file in $files){ From 33730c9ef4218630d460f32829050405ddde72b8 Mon Sep 17 00:00:00 2001 From: jaromirk Date: Thu, 31 Mar 2022 11:57:43 +0200 Subject: [PATCH 4/5] comment fix --- Scenarios/AzSHCI and AVD/Scenario.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scenarios/AzSHCI and AVD/Scenario.ps1 b/Scenarios/AzSHCI and AVD/Scenario.ps1 index ba5809eb..64dd5ef7 100644 --- a/Scenarios/AzSHCI and AVD/Scenario.ps1 +++ b/Scenarios/AzSHCI and AVD/Scenario.ps1 @@ -166,7 +166,7 @@ $output=Grant-AzDiskAccess -ResourceGroupName $AVDResourceGroupName -DiskName $ManagedDiskName -Access 'Read' -DurationInSecond 36000 #10 hours $SAS=$output.accesssas #Start-BitsTransfer -Source $SAS -Destination "\\$ClusterName\ClusterStorage$\$LibraryVolumeName\$SKU.vhd" - #download using AzCopy as it's faster than bits transfer. But it cannot be downloaded directly to CSV + #download using AzCopy as it's faster than bits transfer #https://aka.ms/downloadazcopy-v10-windows\ # Download the package Start-BitsTransfer -Source "https://aka.ms/downloadazcopy-v10-windows" -Destination "$env:UserProfile\Downloads\AzCopy.zip" From 55ddef1260a6457961c9111a95b035c028bf48e1 Mon Sep 17 00:00:00 2001 From: jaromirk Date: Thu, 31 Mar 2022 11:58:03 +0200 Subject: [PATCH 5/5] fixes for SCVMM2022 install --- Scripts/2_CreateParentDisks.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Scripts/2_CreateParentDisks.ps1 b/Scripts/2_CreateParentDisks.ps1 index adb02320..26dbe722 100644 --- a/Scripts/2_CreateParentDisks.ps1 +++ b/Scripts/2_CreateParentDisks.ps1 @@ -604,6 +604,10 @@ If (-not $isAdmin) { if ($DC.AutomaticCheckpointsEnabled -eq $True){ $DC | Set-VM -AutomaticCheckpointsEnabled $False } + if ($LabConfig.InstallSCVMM -eq "Yes"){ + #SCVMM 2022 requires 4GB of memory + $DC | Set-VMMemory -StartupBytes 4GB -MinimumBytes 4GB + } #Apply Unattend to VM if ($VMVersion.Build -ge 17763){ @@ -1017,8 +1021,12 @@ If (-not $isAdmin) { Invoke-Command -VMGuid $DC.id -Credential $cred -ScriptBlock { Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force d:\scvmm\1_SQL_Install.ps1 - d:\scvmm\2_ADK_Install.ps1 - Restart-Computer + d:\scvmm\2_ADK_Install.ps1 + #install prereqs + if (Test-Path "D:\SCVMM\SCVMM\Prerequisites\VCRedist\amd64\vcredist_x64.exe"){ + Start-Process -FilePath "D:\SCVMM\SCVMM\Prerequisites\VCRedist\amd64\vcredist_x64.exe" -ArgumentList "/passive /quiet /norestart" -Wait + } + Restart-Computer } Start-Sleep 10