Created
November 14, 2011 15:13
-
-
Save williamjacksn/1364136 to your computer and use it in GitHub Desktop.
BitLocker Status VBScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' BitLocker Status Script by William Jackson (w@austin.utexas.edu) | |
' Useful as an Absolute Manage Custom Information Field (CIF) | |
cif = "" | |
Set s = CreateObject("WScript.Shell") | |
Set e = s.Exec("manage-bde -status") | |
Set status = e.StdOut | |
Do While status.AtEndOfStream <> True | |
line = status.ReadLine | |
If InStr(line, "Volume ") Then | |
cif = cif & Mid(line, 8, 2) | |
ElseIf InStr(line, "Conversion Status:") Then | |
cif = cif & Mid(line, 26) | |
ElseIf InStr(line, "Percentage Encrypted:") Then | |
cif = cif & "," & Mid(line, 26) & "; " | |
End If | |
Loop | |
WScript.Echo cif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment