How do I set a checkbox?

I want to set a checkbox field in my Syncro Asset field that is already created. How do I output from powershell do do this?

Here is a brief example of what my script looks like, I don’t know how to set a checkbox though.

$Bitlocker = Get-Command Get-BitLockerVolume -ErrorAction SilentlyContinue
if ($Bitlocker -notlike $null) {

Set-Asset-Field -Name “Bitlocker” -Value “Checked”
else {
Set-Asset-Field -Name “Bitlocker” -Value “Unchecked”

Would the values of Checked and Unchecked work? or is it looking for 0 or a 1? or ?

$true or $false

Posting extra characters here just so I can actually post the response.

Thank You

Quick Question, I was able to get the $true $false checkbox to work, and the values show up in the asset under the custom fields.

When I set the same field to show up under Assets & RMM it shows all of the boxes unchecked, even though I know one of the assets has that same box checked if I actually click on it. Any idea why that is or what the fix is?

Dunno. 0 and 1 also works, but doesn’t display on the main Asset & RMM. Guess it’s a bug.

Here are my observations with the checkboxes. I can set a custom asset checkbox with a value of true, false, and no. The conditional statement will accept yes or no, but not true or false. I believe you can use 0 and 1 in both script and saved asset searches.