Skip to content

CopyKeys - Does not detect VM with encryption because VM extension name is hardcoded #33

@o-l-a-v

Description

@o-l-a-v

The CopyKeys script does not detect a VM with encryption because it checks for the VM encryption extension with a hardcoded name.

Hardcoded extension name:

Check for eligible VM:

  • foreach ($Item in $VmList)
    {
    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)
    {
    $SuppressOutput = $VmListBox.Items.Add($Item.Name)
    }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions