Skip to content

Commit fddcf5e

Browse files
grizzlytheodoreTheodore ChangVeryEarly
authored
fix Remove-AzVmss bug (#21284)
* update * Update ChangeLog.md --------- Co-authored-by: Theodore Chang <[email protected]> Co-authored-by: Yabo Hu <[email protected]>
1 parent 2d56d12 commit fddcf5e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
* Removed the image alias `CoreOS` as the publisher CoreOS no longer has any images for Azure.
2424
* Updated the names of the `openSUSE-Leap` and `SLES` aliases to `OpenSuseLeap154` and `SuseSles15SP4` respectively. Updated these aliases to point to an image that actually exists and updated the alias names to be descriptive and versioned.
2525
* Added new descriptive and versioned alias names for the Linux image aliases.
26-
* Added `-NetworkAccessPolicy` parameter to `New-AzSnapshotUpdateConfig`.
27-
* Added `-SharedGalleryImageId` parameter to `New-AzVM`, `New-AzVmConfig`, `New-AzVmss`, `New-AzVmssConfig`, `Update-AzVmss`, and `Set-AzVmssStorageProfile`.
28-
* Updated `Set-AzVMDiagnosticsExtension` to correct capitalization by passing "StorageAccount" as configuration property instead of "storageAccount".
26+
* Addressed bug in `Remove-AzVmss` to throw error when `-InstanceId` is null. [#21162]
2927

3028
## Version 5.6.0
3129
* Added `-NetworkAccessPolicy` parameter to `New-AzSnapshotUpdateConfig`.

src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteInstancesMethod.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public override void ExecuteCmdlet()
5252
IList<string> instanceIds = this.InstanceId;
5353

5454
Rest.Azure.AzureOperationResponse result = null;
55-
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(vmScaleSetName) && instanceIds != null)
55+
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(vmScaleSetName) && this.IsParameterBound(c => c.InstanceId))
5656
{
5757
result = VirtualMachineScaleSetsClient.DeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion:forcedelete).GetAwaiter().GetResult();
5858
}

0 commit comments

Comments
 (0)