File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ function Get-VirtualMachines
596596
597597 foreach ($Item in $VmList )
598598 {
599- if (($null -ne $Item.Extensions ) -and
599+ if (($null -ne $Item.Extensions -and $Item .Extensions.Count -gt 0 ) -and
600600 ($Item.Extensions.Id | ForEach-Object { `
601601 $_.split (' /' )[-1 ].tolower().contains( `
602602 [ConstantStrings ]::adeExtensionPrefix)}) -contains $true )
@@ -2103,4 +2103,4 @@ finally
21032103 $MyInvocation ,
21042104 " CopyKeys completed - $EndTime ." ,
21052105 [LogType ]::INFO)
2106- }
2106+ }
Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ This script copies the disk encryption keys and key encryption keys for Azure Di
1515| 02/23 | - Fixed GUI issues in case of varying resolution.</br > - Fixed login bug in case of expired context. |
1616| 02/28 | - Removing hardcoded vault endpoint and replacing it with one provided by KeyVault RP. |
1717| 04/09 | - Providing MoveCollection MSI with appropriate target key vault access in case the script is used for Azure Resource Mover. |
18+ |30/10/2023 | - Handling case when extensions list is empty but not null
You can’t perform that action at this time.
0 commit comments