зеркало из https://github.com/microsoft/MSLab.git
ADK 1809 support + RSAT install in scenarios for 1809
Former-commit-id: 98085c464e
This commit is contained in:
Родитель
e59b9f418c
Коммит
8fe27a5e0b
|
@ -63,7 +63,10 @@ Write-host "Script started at $StartDateTime"
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -58,7 +58,10 @@ Write-host "Script started at $StartDateTime"
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -136,7 +136,10 @@ Write-host "Script started at $StartDateTime"
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -111,7 +111,10 @@ Write-host "Script started at $StartDateTime"
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
$LabConfig=@{ DomainAdminName='LabAdmin'; AdminPassword='LS1setup!'; Prefix = 'WSLab2019-'; SwitchName = 'LabSwitch'; DCEdition='4' ; Internet=$true ;AdditionalNetworksConfig=@(); VMs=@()}
|
||||
|
||||
#S2D Cluster
|
||||
1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 8GB ; NestedVirt=$true }}
|
||||
1..4 | % {$VMNames="S2D"; $LABConfig.VMs += @{ VMName = "$VMNames$_" ; Configuration = 'S2D' ; ParentVHD = 'Win2019Core_G2.vhdx'; SSDNumber = 0; SSDSize=800GB ; HDDNumber = 12; HDDSize= 4TB ; MemoryStartupBytes= 4GB ; NestedVirt=$true }}
|
||||
|
||||
#Certification Authority
|
||||
$LabConfig.VMs += @{ VMName = 'CA' ; Configuration = 'Simple' ; ParentVHD = 'Win2019Core_G2.vhdx' ; MemoryStartupBytes= 1GB ; MemoryMinimumBytes=1GB ; vTPM=$True ; MGMTNICs=1 }
|
||||
|
|
|
@ -400,7 +400,10 @@ foreach ($LogicalSwitchConfig in $LogicalSwitches.LogicalSwitches) {
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -113,7 +113,10 @@ Write-host "Script started at $StartDateTime"
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0","Rsat.StorageReplica.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -74,7 +74,10 @@ $diskconfig+=@{DiskNumber=4 ; FriendlyName="Data2" ; FileSystem="REFS" ; Site="B
|
|||
}
|
||||
}elseif (($WindowsInstallationType -eq "Client") -and ($CurrentBuildNumber -ge 17763)){
|
||||
#Install RSAT tools
|
||||
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
|
||||
$Capabilities="Rsat.ServerManager.Tools~~~~0.0.1.0","Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0","Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0","Rsat.StorageReplica.Tools~~~~0.0.1.0"
|
||||
foreach ($Capability in $Capabilities){
|
||||
Add-WindowsCapability -Name $Capability -Online
|
||||
}
|
||||
}
|
||||
if ($WindowsInstallationType -eq "Client"){
|
||||
#Install Hyper-V Management features
|
||||
|
|
|
@ -78,10 +78,10 @@ function Get-WindowsBuildNumber {
|
|||
}
|
||||
|
||||
# Checking Folder Structure
|
||||
"ParentDisks","Temp","Temp\DSC","Temp\ToolsVHD\DiskSpd","Temp\ToolsVHD\SCVMM\ADK","Temp\ToolsVHD\SCVMM\SQL","Temp\ToolsVHD\SCVMM\SCVMM","Temp\ToolsVHD\SCVMM\UpdateRollup","Temp\ToolsVHD\VMFleet" | ForEach-Object {
|
||||
"ParentDisks","Temp","Temp\DSC","Temp\ToolsVHD\DiskSpd","Temp\ToolsVHD\SCVMM\ADK","Temp\ToolsVHD\SCVMM\ADKWinPE","Temp\ToolsVHD\SCVMM\SQL","Temp\ToolsVHD\SCVMM\SCVMM","Temp\ToolsVHD\SCVMM\UpdateRollup","Temp\ToolsVHD\VMFleet" | ForEach-Object {
|
||||
if (!( Test-Path "$PSScriptRoot\$_" )) { New-Item -Type Directory -Path "$PSScriptRoot\$_" } }
|
||||
|
||||
"Temp\ToolsVHD\SCVMM\ADK\Copy_ADK_with_adksetup.exe_here.txt","Temp\ToolsVHD\SCVMM\SQL\Copy_SQL2016_or_SQL2017_with_setup.exe_here.txt","Temp\ToolsVHD\SCVMM\SCVMM\Copy_SCVMM_with_setup.exe_here.txt","Temp\ToolsVHD\SCVMM\UpdateRollup\Copy_SCVMM_Update_Rollup_MSPs_here.txt" | ForEach-Object {
|
||||
"Temp\ToolsVHD\SCVMM\ADK\Copy_ADK_with_adksetup.exe_here.txt","Temp\ToolsVHD\SCVMM\ADKWinPE\Copy_ADKWinPE_with_adkwinpesetup.exe_here.txt","Temp\ToolsVHD\SCVMM\SQL\Copy_SQL2016_or_SQL2017_with_setup.exe_here.txt","Temp\ToolsVHD\SCVMM\SCVMM\Copy_SCVMM_with_setup.exe_here.txt","Temp\ToolsVHD\SCVMM\UpdateRollup\Copy_SCVMM_Update_Rollup_MSPs_here.txt" | ForEach-Object {
|
||||
if (!( Test-Path "$PSScriptRoot\$_" )) { New-Item -Type File -Path "$PSScriptRoot\$_" } }
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ $StartDateTime = get-date
|
|||
Write-host "Script started at $StartDateTime"
|
||||
|
||||
If (Test-Path -Path "$PSScriptRoot\ADK\ADKsetup.exe"){
|
||||
$setupfile = (Get-Item -Path "$PSScriptRoot\ADK\ADKsetup.exe" -ErrorAction SilentlyContinue).fullname
|
||||
$setupfile = Get-Item -Path "$PSScriptRoot\ADK\ADKsetup.exe" -ErrorAction SilentlyContinue
|
||||
}else{
|
||||
# Open File dialog
|
||||
Write-Host "Please locate ADKSetup.exe" -ForegroundColor Green
|
||||
|
@ -31,10 +31,34 @@ If (Test-Path -Path "$PSScriptRoot\ADK\ADKsetup.exe"){
|
|||
}
|
||||
}
|
||||
|
||||
if ($setupfile.versioninfo.ProductBuildPart -ge 17763){
|
||||
If (Test-Path -Path "$PSScriptRoot\ADKwinPE\adkwinpesetup.exe"){
|
||||
$winpesetupfile = Get-Item -Path "$PSScriptRoot\ADKwinPE\adkwinpesetup.exe" -ErrorAction SilentlyContinue
|
||||
}else{
|
||||
# Open File dialog
|
||||
Write-Host "Please locate adkwinpesetup.exe" -ForegroundColor Green
|
||||
|
||||
[reflection.assembly]::loadwithpartialname("System.Windows.Forms")
|
||||
$openFile = New-Object System.Windows.Forms.OpenFileDialog
|
||||
$openFile.Filter = "adkwinpesetup.exe files |adkwinpesetup.exe|All files (*.*)|*.*"
|
||||
If($openFile.ShowDialog() -eq "OK"){
|
||||
$setupfile=$openfile.filename
|
||||
Write-Host "File $setupfile selected" -ForegroundColor Cyan
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Installing ADK..." -ForegroundColor Cyan
|
||||
|
||||
Write-Host "ADK Is being installed..." -ForegroundColor Cyan
|
||||
Start-Process -Wait -FilePath $setupfile -ArgumentList "/features OptionID.DeploymentTools OptionID.WindowsPreinstallationEnvironment /quiet"
|
||||
if ($SetupFile.versioninfo.ProductBuildPart -ge 17763){
|
||||
Write-Host "ADK $($SetupFile.versioninfo.ProductBuildPart) Is being installed..." -ForegroundColor Cyan
|
||||
Start-Process -Wait -FilePath $setupfile.fullname -ArgumentList "/features OptionID.DeploymentTools /quiet"
|
||||
Write-Host "ADKwinPE $($winpeSetupFile.versioninfo.ProductBuildPart) Is being installed..." -ForegroundColor Cyan
|
||||
Start-Process -Wait -FilePath $winpesetupfile.fullname -ArgumentList "/features OptionID.WindowsPreinstallationEnvironment /quiet"
|
||||
}else{
|
||||
Write-Host "ADK $($SetupFile.versioninfo.ProductBuildPart) Is being installed..." -ForegroundColor Cyan
|
||||
Start-Process -Wait -FilePath $setupfile.fullname -ArgumentList "/features OptionID.DeploymentTools OptionID.WindowsPreinstallationEnvironment /quiet"
|
||||
}
|
||||
Write-Host "ADK install finished at $(Get-date) and took $(((get-date) - $StartDateTime).TotalMinutes) Minutes"
|
||||
Stop-Transcript
|
||||
Write-Host "Job Done..." -ForegroundColor Green
|
||||
|
|
Загрузка…
Ссылка в новой задаче