Skip to content

Commit

Permalink
fix Remove-AzVmss bug (#21284)
Browse files Browse the repository at this point in the history
* update

* Update ChangeLog.md

---------

Co-authored-by: Theodore Chang <[email protected]>
Co-authored-by: Yabo Hu <[email protected]>
  • Loading branch information
3 people authored Mar 23, 2023
1 parent 2d56d12 commit fddcf5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
* Removed the image alias `CoreOS` as the publisher CoreOS no longer has any images for Azure.
* 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.
* Added new descriptive and versioned alias names for the Linux image aliases.
* Added `-NetworkAccessPolicy` parameter to `New-AzSnapshotUpdateConfig`.
* Added `-SharedGalleryImageId` parameter to `New-AzVM`, `New-AzVmConfig`, `New-AzVmss`, `New-AzVmssConfig`, `Update-AzVmss`, and `Set-AzVmssStorageProfile`.
* Updated `Set-AzVMDiagnosticsExtension` to correct capitalization by passing "StorageAccount" as configuration property instead of "storageAccount".
* Addressed bug in `Remove-AzVmss` to throw error when `-InstanceId` is null. [#21162]

## Version 5.6.0
* Added `-NetworkAccessPolicy` parameter to `New-AzSnapshotUpdateConfig`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override void ExecuteCmdlet()
IList<string> instanceIds = this.InstanceId;

Rest.Azure.AzureOperationResponse result = null;
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(vmScaleSetName) && instanceIds != null)
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(vmScaleSetName) && this.IsParameterBound(c => c.InstanceId))
{
result = VirtualMachineScaleSetsClient.DeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion:forcedelete).GetAwaiter().GetResult();
}
Expand Down

0 comments on commit fddcf5e

Please sign in to comment.