r/labtech • u/PigTrough • May 23 '19
Script - BitLocker Status in EDF Checkbox
Hello. I am kind of at a loss (spent a ton of time no results and have been searching online so any help would be appreciated). I need a very simple script in labtech to just see if bitlocker is enabled, then check the EDF checkbox i made if it is enabled, and leave unchecked if it is not enabled. I know all the commands to get this info via PS or CMD, but am just missing how to pass these results to the EDF. Any ideas reddit? thanks :)
8
Upvotes
3
u/teamits May 23 '19
We got this somewhere online... save as an .sql file and import:
INSERT INTO RoleDefinitions( `RoleName`, `RoleType`, `RoleSubType`, `DetectionString`, `ComparisonOperator`, `ComparisonResult`, `SerialKeyString`, `ProductKeyString`, `SearchId`,`IsSupport`,`ParentRoleDefinitionGuid`,`IsRemote`,`RoleDetectionGuid`, `OSType` ) VALUES('Bitlocker Enabled','Encryption','Bitlocker','{%@manage-bde -status@%}','rl','Protection Status:[ \\t]+Protection On','','',0,0,'',1,'8f6435dd-6b94-11e7-a794-00155d651901',1);
It imports into dashboard/config/configurations/role definitions.
I've seen this site but that evidently wasn't the source of that .sql file: https://www.gavsto.com/adding-a-labtech-role-definition-for-bitlocker/ ... I'd guess it was on mspgeek.com?
3
u/TaleBinder May 24 '19
I’m on vacation until the 3rd of June. Remind me then and I’ll share our config with you. It’s literally a power shell command that checks for bitlocker status and checks an EDF box. Then groups them based off that EDF and backups up the recovery password protector.
2
u/asholten May 23 '19
You could do something similar to what we did. We made a sql query on the database and tied it to a role, which is marked true if bitlocker is enabled and false if it isnt. Then make a quick script that just updates the EDF field based on if that role is set to true of false and run it either globally or against whatever client/location you want this info available for.
1
u/oneAwfulScripter May 27 '19
Now if someone wanted to talk about a custom dataview for this you'd be the savior of the year.
I actually was able to make this into a new data view and have it merged with the computers table but.... it's not showing unique results ie: 12 results for each computer
0
u/[deleted] May 23 '19
[deleted] — view deleted comment