Win32_EncryptableVolume und Bitlocker

Win32_EncryptableVolume und Bitlocker

Ich spiele herum und versuche, die Funktionalität der Klasse Win32_EncryptableVolume zu erlernen (https://learn.microsoft.com/en-us/windows/win32/secprov/win32-encryptablevolume). Ich habe zu diesem Zweck eine VM erstellt und sie mit einem einfachen Bitlocker-Passwort gesichert (kein TPM).

Ich habe das folgende PowerShell-Skript erstellt. Ich weiß, dass die Key Protector-ID korrekt ist (überprüft mit GetKeyProtectors und aus dieser Datei druckt Bitlocker die von Bitlocker erstellte Wiederherstellungsschlüsseldatei aus).

# Namespace is per the Microsoft documentation
$wmi = Get-WmiObject -Namespace "ROOT\CIMV2\Security\MicrosoftVolumeEncryption" -Class Win32_EncryptableVolume

$keyProtectorID = "{C0B908CA-CC22-4A65-B61E-3257D4B5176C}"
#Folder path is only the folder, not the actual filename as specified in the documentation
$folderPath = "C:\tmp"
Invoke-WmiMethod -InputObject $wmi -Name SaveExternalKeyToFile -ArgumentList $keyProtectorID, $folderPath

#Output is as follows:

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 2147746291
PSComputerName   :

WinErr gibt für den Fehler 2147746291 folgende Ausgabe aus:

# for decimal -2147221005 / hex 0x800401f3
  CO_E_CLASSSTRING                                               winerror.h
# Invalid class string
# 1 matches found for "2147746291"

Ich bin nicht sicher, warum die Klassenzeichenfolge falsch ist.

verwandte Informationen