Skip to content

Commit e352655

Browse files
authored
VM Defaulting Size warning improved (#15407)
* size warning improve * changelog
1 parent 0b8a9d2 commit e352655

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
-->
2222
## Upcoming Release
23+
* Fixed the warning in `New-AzVM` cmdlet stating the sku of the VM is being defaulted even if a sku size is provided by the user. Now it only occurs when the user does not provide a sku size.
2324

2425
## Version 4.15.0
2526
* Added optional parameter `-OrchestrationMode` to `New-AzVmss` and `New-AzVmssConfig`

src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ async Task StrategyExecuteCmdletAsync(IAsyncCmdlet asyncCmdlet)
485485
var parameters = new Parameters(this, client, resourceClient);
486486

487487
// Information message if the default Size value is used.
488-
if (!this.IsBound(Size))
488+
if (!this.IsParameterBound(c => c.Size))
489489
{
490490
WriteInformation("No Size value has been provided. The VM will be created with the default size Standard_D2s_v3.", new string[] { "PSHOST" });
491491
}

0 commit comments

Comments
 (0)