Merge pull request #53 from BaoyinQiao/bqiao-VMEncryption
Add a new VI Property: KMSserver for VM
This commit is contained in:
@@ -59,9 +59,16 @@ New-VIProperty -Name Locked -ObjectType VirtualMachine -Value {
|
||||
($vm.extensiondata.Runtime.ConnectionState -eq "invalid") -and ($vm.extensiondata.Config.KeyId)
|
||||
} -BasedOnExtensionProperty 'Runtime.ConnectionState','Config.KeyId' -Force | Out-Null
|
||||
|
||||
New-VIProperty -Name KMSserver -ObjectType VirtualMachine -Value {
|
||||
Param ($VM)
|
||||
if ($VM.Encrypted) {
|
||||
$VM.EncryptionKeyId.ProviderId.Id
|
||||
}
|
||||
} -BasedOnExtensionProperty 'Config.KeyId' -Force | Out-Null
|
||||
|
||||
New-VIProperty -Name Encrypted -ObjectType HardDisk -Value {
|
||||
Param ($hardDisk)
|
||||
$hardDisk.ExtensionData.Backing.KeyId -ne $null
|
||||
Param ($hardDisk)
|
||||
$hardDisk.ExtensionData.Backing.KeyId -ne $null
|
||||
} -BasedOnExtensionProperty 'Backing.KeyId' -Force | Out-Null
|
||||
|
||||
New-VIProperty -Name EncryptionKeyId -ObjectType HardDisk -Value {
|
||||
|
||||
Reference in New Issue
Block a user