Here's a copy of the vbscript text directly from the job I created. Again, the only thing I changed from the original article was the myDataClass value.
On Error Resume Next
'Call WMI for encryption information
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2\Security\MicrosoftVolumeEncryption")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_EncryptableVolume",,48)
Dim arEncryptionMethod
Dim arProtectionStatus
Dim arConversionStatus
Dim arLockStatus
arEncryptionMethod = Array("None", "AES 128 With Diffuser", "AES 256 With Diffuser", "AES 128", "AES 256")
arProtectionStatus = Array("Protection Off", "Protection On", "Protection Unknown")
arConversionStatus = Array("Fully Decrypted", "Fully Encrypted", "Encryption In Progress", "Decryption In Progress", "Encryption Paused", "Decryption Paused")
arLockStatus = Array("Unlocked", "Locked")
'=====================================================================
'Create instance of Altiris NSE component
dim nse
set nse = WScript.CreateObject ("Altiris.AeXNSEvent")
' Set the header data of the NSE
' This GUID for the NS is the same for all versions of 7.1 and 7.5
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
nse.Priority = 1
'myDataClass = "BitLocker_Status"
'If the above name doesn't work use the line below and replace the guid with
'the guid shown in the properties of the custom data class created on the server.
myDataClass = "{9cbee7b0-dc88-4a2a-bbc3-899bacb32b94}"
'Create Inventory data block.
dim objDCInstance
set objDCInstance = nse.AddDataClass (myDataClass)
dim objDataClass
set objDataClass = nse.AddDataBlock (objDCInstance)
'Populate the NSE file with desired data
For Each objItem in colItems
'Add a new row for each drive on the computer
Dim objDataRow
set objDataRow = objDataClass.AddRow
Dim EncryptionMethod
Dim ProtectionStatus
Dim ConversionStatus
Dim EncryptionPercentage
Dim VolumeKeyProtectorID
Dim LockStatus
objItem.GetEncryptionMethod EncryptionMethod
objItem.GetProtectionStatus ProtectionStatus
objItem.GetConversionStatus ConversionStatus, EncryptionPercentage
objItem.GetKeyProtectors 0,VolumeKeyProtectorID
objItem.GetLockStatus LockStatus
objDataRow.SetField 0, objItem.DriveLetter
objDataRow.SetField 1, arEncryptionMethod(EncryptionMethod)
If arProtectionStatus(ProtectionStatus) = "Protection On" then
objDataRow.SetField 2, "1"
ElseIf arProtectionStatus(ProtectionStatus) = "Protection Off" then
objDataRow.SetField 2, "0"
End If
objDataRow.SetField 3, arConversionStatus(ConversionStatus)
objDataRow.SetField 4, arEncryptionPercentage(EncryptionPercentage)
objDataRow.SetField 5, arLockStatus(LockStatus)
Next
'send the NSE file
nse.Send
Original Message:
Sent: Dec 16, 2022 04:02 AM
From: Roman Vassiljev
Subject: BitLocker Status
Hi Clint,
You may check agent logs, located under C:\ProgramData\Symantec\Symantec Agent\Logs on endpoint where task is running to see details why vbscript is failed.
If script is executed on endpoint successfully and issue occurs during processing results, then please check logs on server side using Altiris Log Viewer utility(it is installed with ITMS)
BTW may you please attach your actual script here? Now it seems that script has some issue and VBS is failed.
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}" should work for 8.x.
Thanks,
Roman
Original Message:
Sent: Dec 13, 2022 12:30 PM
From: Clinton Watarai
Subject: BitLocker Status
Hi Roman,
I just did a Quick Run but the task failed (according to the SMC) on all computers I tried it on. The report's blank where the only thing I changed in the vbscript was the GUID for myDataClass. Is there somewhere I could check that'd give more details on why the vbscript task failed?
Also, the following caught my eye in the script since it specifically mentions 7.1/7.5 whereas I'm running 8.1. If this NS GUID is different for 8.1, where do I find it?
' This GUID for the NS is the same for all versions of 7.1 and 7.5
nse.To = "{1592B913-72F3-4C36-91D2-D4EDA21D2F96}"
Clint
Original Message:
Sent: Dec 13, 2022 10:24 AM
From: Roman Vassiljev
Subject: BitLocker Status
Hi Clint,
This article should be still applicable to ITMS 8.x. At least I was able to follow mentioned steps and custom inventory task returned some data, created SQL report also displayed it. Do you observe some issue? May you please provide details what step from this KB article does not work for your 8.1?
Thanks,
Roman
Original Message:
Sent: Dec 12, 2022 03:58 PM
From: Clinton Watarai
Subject: BitLocker Status
Can the following KB article be adapted for Altiris 8.x? I'm only running 8.1 and just realized that the article mentions 7.x (and I thought my version was super old...hehe).
Inventory BitLocker Encryption Status of Drives and Computers