Add Laptop / Desktop Condition To Deployments

0

It would be great if you could add a check in conditions for Laptops / Desktops.

 

Example: If its a laptop run if not don't.

Cancel
login to comment
0

I just tested it on a new Windows 10 build with no software and not joined to the domain and it disappears after boot.

For what i'm doing that's fine. Again I just wanted to share how it is behaving.

Cancel
login to comment

0

Sounds like something is preventing the registry change from staying. Maybe A/V? Or a GPO?

Cancel
login to comment

0

I wanted to update you on something I've found. You can write that to the registry but it disappears after a reboot.

Just an FYI

Cancel
login to comment

0

Tested it on a target and I think it will work for what i'm doing.

 

Thanks gents!

Cancel
login to comment

0

His code will run on the fly on the target. The only issue will be that the registry is tainted with the key that gets created, but it is of little worry. Nothing about it is harmful to the system. And, once you have that set, you could do cool things with Registry scanners in Inventory to separate things out based on Chassis type. It's a very cool trick.

Cancel
login to comment

0

Interesting idea! Does the new ChassisType value need to be in inventory or does the condition run on the fly on the target?

 

Cancel
login to comment

0

You could build a step that saves the Chassis Type into the registry and read that value in the next step.

$Chassis_Type_Number = (Get-WmiObject Win32_SystemEnclosure).ChassisTypes

# Chassis Type values from https://technet.microsoft.com/en-us/library/ee156537.aspx
if ( $Chassis_Type_Number -In 8,9,10,11,12,14 ) {

$Chassis_Type = "Laptop"

} else {

$Chassis_Type = "Desktop"

}

New-ItemProperty -Path "HKLM:\HARDWARE\DESCRIPTION\System" -Name "ChassisType" -PropertyType "String" -Value $Chassis_Type -Force

 

Cancel
login to comment

0

Very true but in this case I'm building a package with a lot of nested packages for new PC builds and having that option would be nice

Cancel
login to comment

0

You could do this with an Inventory Collection, and then just deploy to the correct Collection.

Cancel
login to comment

Reply