Re: Where is \root\cimv2\Security\MicrosoftVolumeEncryption?
- From: OldDog <mikef2691@xxxxxxxxxxx>
- Date: Mon, 4 May 2009 14:44:46 -0700 (PDT)
On May 1, 10:10 am, OldDog <mikef2...@xxxxxxxxxxx> wrote:
On Apr 30, 10:01 pm, OldDog <mikef2...@xxxxxxxxxxx> wrote:
On Apr 30, 1:59 pm, OldDog <mikef2...@xxxxxxxxxxx> wrote:
Hi,
I have seen references to this class on TechNet, however when I check
my WMI classes on Vista Enterprise, I do not see it. I don't see
Security listed at all. Is there something I need to do to use this
class??
OldDog
By using the WMI browser I found the elusive \root\cimv2\Security
\MicrosoftVolumeEncryption class.
So it's there, just kind of hidden. In any event, all that it will
show me is the encryptable volumes.
What I am really looking for is a way to determine if BitLocker is
enabled and running on a machine.
Via a script, of course. Any ideas?
OldDog
I found this on the intertubes; one problem it reports 0 (zero) for
status regardless of the actual state;
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2\Security\MicrosoftVolumeEncryption")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_EncryptableVolume",,48)
For Each objItem in colItems
Wscript.Echo "DeviceID: " & objItem.DeviceID
Wscript.Echo "DriveLetter: " & objItem.DriveLetter
Wscript.Echo "EncryptionMethod: " & objItem.GetEncryptionMethod
Wscript.Echo "ProtectionStatus: " & objItem.GetProtectionStatus
Wscript.Echo "ConversionStatus: " & objItem.GetConversionStatus
Next
I think this is on the right track, just something is missing.
OldDog- Hide quoted text -
- Show quoted text -
So I added an "if" statement that restricts the view to the system
drive ( C: ) %99.9 of the time.
<-------------- Start Script ----------------------------------->
strComputer = "."
Set oShell = CreateObject("WScript.Shell")
strSDL = oShell.ExpandEnvironmentStrings("%SystemDrive%")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\CIMV2\Security\MicrosoftVolumeEncryption")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_EncryptableVolume",,48)
For Each objItem in colItems
If objItem.DriveLetter = strSDL then
WScript.Echo "DeviceID: " & objItem.DeviceID
Wscript.Echo "DriveLetter: " & objItem.DriveLetter
Wscript.Echo "EncryptionMethod: " & objItem.GetEncryptionMethod
Wscript.Echo "ProtectionStatus: " & objItem.GetProtectionStatus
Wscript.Echo "ConversionStatus: " & objItem.GetConversionStatus
End If
Next
<------------ End Script -------------------------->
Be carefull of the wrap, it's a killer.
I still have the issue where it reports a 0 (zero) for all three
objects.
Still working on it.
OldDog
.
- Follow-Ups:
- Re: Where is \root\cimv2\Security\MicrosoftVolumeEncryption?
- From: Malcolm McCaffery
- Re: Where is \root\cimv2\Security\MicrosoftVolumeEncryption?
- References:
- Prev by Date: Access textbox contents to Word via VBScript
- Next by Date: Re: Incrementing number in INI file
- Previous by thread: Re: Where is \root\cimv2\Security\MicrosoftVolumeEncryption?
- Next by thread: Re: Where is \root\cimv2\Security\MicrosoftVolumeEncryption?
- Index(es):
Relevant Pages
|