aideb
asked on
WMI Query for BitLocker status on C drive in Task Sequence in SCCM
I need to put a bit of logic in my task sequence that will only deploy a package if the C drive is not encrypted (there are two volumes on our machines)
How do I get to the point of identifying the C drive as the volumes are shown as security identifiers?
Can anyone assist?
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2\Security\MicrosoftVolumeEncryption")
' Obtain an instance of the the class
' using a key property value.
Set objShare = objWMIService.Get("Win32_EncryptableVolume.DeviceID='\\?\Volume{1e2a7781-dd0f-11e2-90bf-24be05232bd4}\'")
' no InParameters to define
' Execute the method and obtain the return status.
' The OutParameters object in objOutParams
' is created by the provider.
Set objOutParams = objWMIService.ExecMethod("Win32_EncryptableVolume.DeviceID='\\?\Volume{1e2a7781-dd0f-11e2-90bf-24be05232bd4}\'", "GetLockStatus")
' List OutParams
Wscript.Echo "Out Parameters: "
Wscript.echo "LockStatus: " & objOutParams.LockStatus
Wscript.echo "ReturnValue: " & objOutParams.ReturnValue
How do I get to the point of identifying the C drive as the volumes are shown as security identifiers?
Can anyone assist?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER