Powershell : Extend SCCM Hardware Inventory

This scenario involves creation of new WMI classes on a PC to capture custom registry settings which have been populated using a script run from a GPO. Create new WMI classes on an example PC import WMI-Commands.psm1 module from https://gallery.technet.microsoft.com/WMI-PowerShell-cmdlets-ac049637 New-WMIClass -ClassName “BitLockerReport” in the Root\cimV2 namespace New-WMIClass -ClassName “aaaa”,”bbbb” to create two new classes in Root\cimV2 New-WMIProperty -ClassName “BitLockerReport” -PropertyName “BitLockerHash”  (note that you can add -PropertyValue to define the default value for the new property Add the new WMI classes to Client Settings SCCM Console – Administration >…

Read More

Powershell : add UDA Requirement to Deployment Type

Adds a Primary Device Requirement for a Deployment Type where the application will only be installed if the user is a primary user of the computer.   Add-CMDeploymentTypeGlobalCondition.ps1 -ApplicationName “application name” -DeploymentTypeName “deployment type” -sdkserver “server name” -sitecode “XX1” -GlobalCondition “PrimaryDevice” -Operator “IsEquals” -Value “True”

Read More