Hi Guys,
So I’m trying to write this crazy (at least for me) checking for encryption targetted to Laptops and I’m running into incompatible types. when the system test positive for Sophos.
My understanding is that the boolean goes inside the if statement so when it’s true then it can spot a string and if false it can spit a different string. as long as both were strings.
So if the final result of the software check is a string why am I getting incompatible types.
any assistance is appreciated.
q: if((exists wmi "root\CIMv2\Security\MicrosoftVolumeEncryption" whose (exists select objects "ProtectionStatus, DriveLetter from Win32_EncryptableVolume" whose (integer value of property "ProtectionStatus" of it = 1 AND string value of property "DriveLetter" of it = "C:") of it))) then ("Bitlocker Enabled") else (if((exists structures whose(name of it as lowercase = "portable_battery") of smbios) OR (exists selects "* from Win32_Battery" of wmi) OR (exists selects "* from Win32_PortableBattery" of wmis) OR (exists selects "* from DCIM_Battery" of wmis "root\dcim\sysman"))then (if(exists keys whose (value "DisplayName" of it as string as lowercase starts with "sophos") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of ( registry;native registry ))then((values "DisplayName" of it, values "DisplayVersion" of it) of keys whose (value "DisplayName" of it as string as lowercase contains "sophos") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (registry;native registry))else("System Not Encrypted")) else("Desktop"))
A: Bitlocker Enabled
T: 216.865 ms