diff --git a/CopyKeys/CopyKeys.ps1 b/CopyKeys/CopyKeys.ps1 index e5d1e5d..ac99789 100644 --- a/CopyKeys/CopyKeys.ps1 +++ b/CopyKeys/CopyKeys.ps1 @@ -596,7 +596,7 @@ function Get-VirtualMachines foreach ($Item in $VmList) { - if (($null -ne $Item.Extensions) -and + if (($null -ne $Item.Extensions -and $Item.Extensions.Count -gt 0) -and ($Item.Extensions.Id | ForEach-Object { ` $_.split('/')[-1].tolower().contains( ` [ConstantStrings]::adeExtensionPrefix)}) -contains $true) @@ -2103,4 +2103,4 @@ finally $MyInvocation, "CopyKeys completed - $EndTime.", [LogType]::INFO) -} \ No newline at end of file +} diff --git a/CopyKeys/README.md b/CopyKeys/README.md index 2b85fc8..e0c0d4a 100644 --- a/CopyKeys/README.md +++ b/CopyKeys/README.md @@ -15,3 +15,4 @@ This script copies the disk encryption keys and key encryption keys for Azure Di |02/23 | - Fixed GUI issues in case of varying resolution.
- Fixed login bug in case of expired context. | |02/28 | - Removing hardcoded vault endpoint and replacing it with one provided by KeyVault RP. | |04/09 | - Providing MoveCollection MSI with appropriate target key vault access in case the script is used for Azure Resource Mover. | +|30/10/2023 | - Handling case when extensions list is empty but not null