Update VMware.VMEncryption.psm1
This commit is contained in:
committed by
GitHub
parent
13649b8e35
commit
29719d6ca7
@@ -81,6 +81,13 @@ New-VIProperty -Name Encrypted -ObjectType HardDisk -Value {
|
||||
$hardDisk.ExtensionData.Backing.KeyId -ne $null
|
||||
} -BasedOnExtensionProperty 'Backing.KeyId' -Force | Out-Null
|
||||
|
||||
New-VIProperty -Name KMSserver -ObjectType VMHost -Value {
|
||||
Param ($VMHost)
|
||||
if ($VMHost.CryptoSafe) {
|
||||
$VMHost.ExtensionData.Runtime.CryptoKeyId.ProviderId.Id
|
||||
}
|
||||
} -BasedOnExtensionProperty 'Runtime.CryptoKeyId.ProviderId.Id' -Force | Out-Null
|
||||
|
||||
New-VIProperty -Name EncryptionKeyId -ObjectType HardDisk -Value {
|
||||
Param ($Disk)
|
||||
if ($Disk.Encrypted) {
|
||||
@@ -976,7 +983,7 @@ Function Set-VMDiskEncryptionKey {
|
||||
C:\PS>$KMSCluster = Get-KMSCluster | select -last 1
|
||||
C:\PS>$VM = Get-VM -Name win2012
|
||||
C:\PS>$HardDisk = get-vm $vm|Get-HardDisk
|
||||
C:\PS>$HardDisk|$Set-VMEncryptionKey -VM $VM -KMSClusterId $KMSCluster.Id -Deep
|
||||
C:\PS>$HardDisk|Set-VMDiskEncryptionKey -VM $VM -KMSClusterId $KMSCluster.Id -Deep
|
||||
|
||||
Deep rekeys all the disks of the $VM using a new key.
|
||||
The key is generated from the KMS whose clusterId is $KMSCluster.Id.
|
||||
@@ -1681,7 +1688,7 @@ Function Get-KMServerStatus {
|
||||
[String] $KMSClusterId
|
||||
)
|
||||
|
||||
Begin {
|
||||
Begin {
|
||||
# Confirm the connected VIServer is vCenter Server
|
||||
ConfirmIsVCenter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user