Hello Guys,
I have written a VB script to check if drives are encrypted with bitlocker or not. It gives me "Access Denied" error. I do have required access. The script runs successfully only if it is executed with "Run As Administrator" option. This is making it difficult to pull status of remote systems. Kindly help.
---------------------------------------------------------------------------------------------------------------
strComputer = "10.48.7.150"
SET objWMIService = GetObject("winmgmts:\\" & strComputer & "\Root\CIMV2\Security\MicrosoftVolumeEncryption")
SET objWMIObject = objWMIService.ExecQuery("select * from win32_EncryptableVolume")
For Each drive in objWMIObject
Wscript.Echo "Drive Letter: "& drive.DriveLetter
Wscript.Echo "Protecton Status: "& drive.ProtectionStatus
Next
---------------------------------------------------------------------------------------------------------------