Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Win32_EncryptableVolume ExecMethod GetProtectionStatus Bitlocker is Enabled Disabled
strComputer = "." ;remote computername or "." for the local machine. strUser = "" strPswd = "" objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") objWMIService = objSWbemLocator.ConnectServer(strComputer, "\root\cimv2\security\microsoftvolumeencryption", strUser, strPswd ) objSecurity = objWMIService.Security_ objSecurity.ImpersonationLevel = 3 objSecurity.AuthenticationLevel = 6 ;WbemAuthenticationLevelPktPrivacy = 6 colItems = objWMIService.ExecQuery ("Select * from Win32_EncryptableVolume") ForEach objInstance In colItems ; Check for object. If !objInstance Then Continue If ObjectTypeGet(objInstance) == "EMPTY" Then Continue ; Compose the Bitlocker status and display same. If objInstance.ProtectionStatus == 0 strStatus = "PROTECTION OFF" Endif If objInstance.ProtectionStatus == 1 strStatus = "PROTECTION ON" EndIf Message("Drive: ":objInstance.DriveLetter, "Encryption status: ":strStatus) Next Exit
Article ID: W18478
Filename: Win32_EncryptableVolume.txt
File Created: 2013:10:16:10:36:22
Last Updated: 2013:10:16:10:36:22