Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CopyKeys/CopyKeys.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -2103,4 +2103,4 @@ finally
$MyInvocation,
"CopyKeys completed - $EndTime.",
[LogType]::INFO)
}
}
1 change: 1 addition & 0 deletions CopyKeys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.</br> - 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