Skip to content

Commit 6b95db1

Browse files
committed
ISO/VHD parameter addition
1 parent 9c3bb34 commit 6b95db1

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

CanaryValidator/Canary.Tests.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[CmdletBinding(DefaultParameterSetName="default")]
1+
#[CmdletBinding(DefaultParameterSetName="default")]
22
param (
33
[parameter(HelpMessage="Tenant ID value from Azure Stack active directory")]
44
[Parameter(ParameterSetName="default", Mandatory=$true)]
@@ -25,11 +25,16 @@ param (
2525
[Parameter(ParameterSetName="tenant", Mandatory=$true)]
2626
[ValidateNotNullOrEmpty()]
2727
[pscredential]$TenantAdminCredentials,
28-
[parameter(HelpMessage="Local path where the windows ISO is stored")]
28+
[parameter(HelpMessage="Local path where the windows 2016/2012R2 ISO image is stored")]
2929
[Parameter(ParameterSetName="default", Mandatory=$false)]
3030
[Parameter(ParameterSetName="tenant", Mandatory=$false)]
3131
[ValidateScript({Test-Path -Path $_})]
3232
[string]$WindowsISOPath,
33+
[parameter(HelpMessage="Local path where the windows 2016/2012R2 VHD file is stored")]
34+
[Parameter(ParameterSetName="default", Mandatory=$false)]
35+
[Parameter(ParameterSetName="tenant", Mandatory=$false)]
36+
[ValidateScript({Test-Path -Path $_})]
37+
[string]$WindowsVHDPath,
3338
[parameter(HelpMessage="Fully qualified domain name of the azure stack environment. Ex: contoso.com")]
3439
[Parameter(ParameterSetName="default", Mandatory=$false)]
3540
[Parameter(ParameterSetName="tenant", Mandatory=$false)]
@@ -162,7 +167,7 @@ while ($runCount -le $NumberOfIterations)
162167
{
163168
Invoke-Usecase -Name 'UploadWindows2016ImageToPIR' -Description "Uploads a windows server 2016 image to the PIR" -UsecaseBlock `
164169
{
165-
if (-not (Get-AzureRmVMImage -Location $ResourceLocation -PublisherName "MicrosoftWindowsServer" -Offer "WindowsServer" -Sku "2016-DataCenter-Core" -ErrorAction SilentlyContinue))
170+
if (-not (Get-AzureRmVMImage -Location $ResourceLocation -PublisherName "MicrosoftWindowsServer" -Offer "WindowsServer" -Sku "2016-Datacenter-Core" -ErrorAction SilentlyContinue))
166171
{
167172
New-Server2016VMImage -ISOPath $WindowsISOPath -TenantId $AADTenantID -ArmEndpoint $AdminArmEndpoint -Version Core -AzureStackCredentials $ServiceAdminCredentials
168173
}

0 commit comments

Comments
 (0)