detection method for bitlocker failed

Copper Contributor

Hello,

 

The followed code work without problem to return "On" if bitlocker is well present.

But when this is use as detection method it looks like not supported !!!

 

$BitlockerStatus = (Get-BitLockerVolume -MountPoint "c:").ProtectionStatus


if($BitlockerStatus -eq "On")
{
      return "installed"
}

 

somebody knows about

 

9 Replies

@Michels12345 

 

Start by adding logging to your script and review the results. that will give you more details as to what is happening. 

thanks I try with transcript but same problem 😞

Exactly what are the results of the bitlocker query? 

@Garth-MVP 

 

Hi,

 

if your machine is using bitlocker you can easily try the script. If present you will get "installed" if not nothing. Like this you can see that this is working fine, but when this is used in Configuration Manager as detection method for an application looks like the script is not working at all and I have then next print screen in software center in the application installation screen.

 

Michels12345_1-1703142367760.png

 

 

 

Let me try this again...
As I understand it, you are saying that you have tested this script on a device, and you get the right results. Then you deploy this same script via ConfigMgr to the same device, and you are getting different results.

As such you need to change you script to add logging to see the results of $BitlockerStatus even better you break it down to show the full results of Get-BitLockerVolume then filter the results.

Yes I understand your point, but the script don't start at all. Like the software center refuse to run this script !
I dont have another CM to test, but if you have one just use this detection method for any other software, you dont need to start the installation.
What do the log say as to why it is failing? How exactly did you setup the deployment? Are we talking about an application or program?

@Garth-MVP 

 

Configuration Manager/application management/applications

Deployment type/type script in Powershell/

The program inself is a powershell script about Bitlocker for existing laptop previoulsy used with mbam and new laptop not using mbam...

 

There is a detection Method also in powershell
This a short version of the script I'm using because more checks are done. But if the script is like this The application shows in the status : "This software is not applicable to your device"

 

$BitlockerStatus = (Get-BitLockerVolume -MountPoint "c:").ProtectionStatus

if($BitlockerStatus -eq "On")
{
return $true
}

 

And what do the logs say is happening?