![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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. > extra information to enable someone who could not help you before to help you now? -- HTH, Bob Barrows |
My System Specs![]() |
![]() |
| 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 | |||