diff --git a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 index 1bc8fbe9b2f3..202c9b480b25 100644 --- a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 @@ -61,6 +61,15 @@ Install-WindowsFeature -Name NET-Framework-45-Features -IncludeAllSubFeature Install-WindowsFeature -Name BITS -IncludeAllSubFeature Install-WindowsFeature -Name DSC-Service +# Install FS-iSCSITarget-Server +$fsResult = Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeAllSubFeature -IncludeManagementTools +if ( $fsResult.Success ) { + Write-Host "FS-iSCSITarget-Server has been successfully installed" +} else { + Write-Host "Failed to install FS-iSCSITarget-Server" + exit 1 +} + Write-Host "Disable UAC" Disable-UserAccessControl diff --git a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 index d32c0dc416af..12feeabebbba 100644 --- a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 @@ -57,6 +57,14 @@ Install-WindowsFeature -Name NET-Framework-Features -IncludeAllSubFeature # Explicitly install all 4.7 sub features to include ASP.Net. # As of 1/16/2019, WinServer 19 lists .Net 4.7 as NET-Framework-45-Features Install-WindowsFeature -Name NET-Framework-45-Features -IncludeAllSubFeature +# Install FS-iSCSITarget-Server +$fsResult = Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeAllSubFeature -IncludeManagementTools +if ( $fsResult.Success ) { + Write-Host "FS-iSCSITarget-Server has been successfully installed" +} else { + Write-Host "Failed to install FS-iSCSITarget-Server" + exit 1 +} Write-Host "Disable UAC" Disable-UserAccessControl