Syncro System Status:

Getting the form factor from Syncro

I may be blind, but can someone tell me what variable I need to use to grab the form factor (desktop/laptop). We want to adjust some power settings, but only want to apply to desktops and I can’t seem to find what I am looking for. Thanks!

I don’t see that it is available as a platform variable. You’ll probably need to audit this yourself and have it write to a custom field that you can pull from, or you setup your policy folders to segment desktops and laptops with different policies.

You could test out this code:,10%20is%20returned%2C%20the%20computer%20is%20a%20notebook.

I haven’t, but it looks promising!

Under Asset information, the form factor seems to be auto-populated, so it is strange to me to re-invent the wheel. Does anyone from Syncro know how to grab this information as a variable?
Asset information

Our agent makes a call to Windows to determine the form factor. You can make a similar call in Powershell with this command (or just Get-ComputerInfo if you want the whole list)

Get-ComputerInfo | Select PowerPlatformRole

We will recognize common form factors that are returned and unrecognized types will default to ‘desktop’ - since this is just a call there isn’t any way to alter that data.

Thanks for the additional info. The problem here is, that info is not available as a platform variable, as well as some other important info that is often used in scripts. So instead of just being able to pull from the database, we have to script it in one way or another.

1 Like

Hi, i have script for this. Just create a new Custom Asset Field “FormFactor” for this and replace YOURSUBDOMAIN in the script with your Syncro subdomain (ex. = company)

Import-Module $env:SyncroModule
Function Detect-Laptop
Param( [string]$computer = “localhost” )
$isLaptop = $false
#The chassis is the physical container that houses the components of a computer. Check if the machine’s chasis type is 9.Laptop 10.Notebook 14.Sub-Notebook
if(Get-WmiObject -Class win32_systemenclosure -ComputerName $computer | Where-Object { $_.chassistypes -eq 9 -or $_.chassistypes -eq 10 -or $_.chassistypes -eq 14})
{ $isLaptop = $true }
#Shows battery status , if true then the machine is a laptop.
if(Get-WmiObject -Class win32_battery -ComputerName $computer)
{ $isLaptop = $true }
$output = If(Detect-Laptop) { “Laptop” }
else { “Desktop”}
Set-Asset-Field -Subdomain YOURSUBDOMAIN -Name "FormFactor" -Value $output```

You don’t need subdomain in your script. It was deprecated a while ago and can cause scripts to fail.