99 [Parameter (Mandatory = $true )][ValidateNotNullOrEmpty ()][string ] $SQLVersionEdition ,
1010 [Parameter (Mandatory = $true )][ValidateNotNullOrEmpty ()][string ] $SQLPort ,
1111 [Parameter (Mandatory = $true )][ValidateNotNullOrEmpty ()][string ] $SQLUserName ,
12- [Parameter (Mandatory = $true )][ValidateNotNullOrEmpty ()][string ] $SQLPwd
12+ [Parameter (Mandatory = $true )][ValidateNotNullOrEmpty ()][string ] $SQLPwd ,
13+ [Parameter (Mandatory = $true )][ValidateNotNullOrEmpty ()][string ] $VMPriority
1314);
1415
1516$scriptpath = $MyInvocation.MyCommand.Path ;
@@ -28,6 +29,7 @@ Log-Output "ResourceGroupName:", $ResourceGroupName;
2829Log- Output " BuildId:" , $BuildId ;
2930Log- Output " SQLVersionEdition:" , $SQLVersionEdition ;
3031Log- Output " SQLPort:" , $SQLPort ;
32+ Log- Output " VMPriority:" , $VMPriority ;
3133Log- Output " Parameters: ---------------------------" ;
3234Log- Output " <-><-><-><-><-><-><-><-><-><-><-><-><-><->" ;
3335
@@ -128,7 +130,7 @@ Log-Output "DONE: Creating NIC $InterfaceName";
128130Log- Output " Creating VM $VMName " ;
129131
130132$output = az vm create -- name " $VMName " -- resource- group " $ResourceGroupName " -- location " $Location " -- admin- password " $VMAdminPwd " `
131- -- admin- username " $VMAdminName " -- computer- name " $VMName " -- image " $ImageUrn " -- nics " $InterfaceName " -- priority Spot `
133+ -- admin- username " $VMAdminName " -- computer- name " $VMName " -- image " $ImageUrn " -- nics " $InterfaceName " -- priority " $VMPriority " `
132134 -- size $Size -- data- disk- sizes- gb 8 | ConvertFrom-Json ;
133135if (! $output ) {
134136 Log- Output " VMName: " , $VMName ;
0 commit comments