This commit is contained in:
Zack Meier
2026-04-15 15:42:41 -05:00
parent 74edcc4d9a
commit 03dba08135
146 changed files with 9119 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
$Result = [System.Collections.ArrayList]@()
$VMHosts = Get-VMHost
ForEach ($VMHost in $VMHostNames) {
$EsxCli = Get-EsxCli -VMHost $VMHost -V2
$Settings = $EsxCli.system.settings.encryption.get.invoke()
If ($Settings.Mode -eq "TPM") {
$list = $EsxCli.system.settings.encryption.recovery.list.invoke()
$obj = [PSCustomObject]@{
'Name' = $VMHost
'Key' = $list.Key
'RecoveryId' = $list.RecoveryId
}
$null = $Result.Add($obj)
}
else {
$obj = $null
$list = $null
}
}