Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Scripting BitLocker in vbScript

Reply
 
Old 05-05-2009   #1 (permalink)
OldDog


 
 

Scripting BitLocker in vbScript

Hi,

I have decided to rename this thread in the hopes that someone can
help me out here.

The problem with the script below is that it returns a 0 (zero) for
all three objects
regardless of the actual state, which could be 0-2 for protection
Statu, 0-4 for the Encryption Method or 0-5 for the conversion status.
TIA, OldDog


<-------------- 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 -------------------------->



My System SpecsSystem Spec
Old 05-06-2009   #2 (permalink)
Bob Barrows


 
 

Re: Scripting BitLocker in vbScript

OldDog wrote:
Quote:

> Hi,
>
> I have decided to rename this thread in the hopes that someone can
> help me out here.
>
I'm not sure why you thought that would help. have you provided any
extra information to enable someone who could not help you before to
help you now?

--
HTH,
Bob Barrows


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Scripting.FileSystemObject with VBScript in HTML page VB Script
Scripting BitLocker PowerShell
How to do No hang up VBScript (nohup for VBScript) VB Script
Restored Factory Settings on Laptop that had BitLocker - Now want to do bitlocker again Vista General
Scripting bug? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46