PowerShell Commands for SCCM Client Updates
Technet Article:Â https://docs.microsoft.com/en-us/mem/configmgr/develop/reference/core/clients/client-classes/triggerschedule-method-in-class-sms_client
The SCCM client allows for using PowerShell to trigger a SCCM Client update.
Example:
Hardware Inventory:
Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000001}"
Software Inventory:
Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000002}"
Machine Policy Retrieval and Evaluation
Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000022}"
Use Cases:
Silent install or uninstall string followed by a software inventory to update the database
msiexec /x <PRODUCT CODE> /qn
Remove-Item <Registry Keys> -Force
Remove-Item <Folder> -Force
powershell.exe Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000002}"
Patching a system with quicker reporting
msiexec /p <MSP file> /qn
powershell.exe Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000002}"
Standard BIOS Task sequence with a hardware update at the end for reporting to SCCM the updated hardware/bios information
Disable MBAM
Install BIOS package
powershell.exe Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000001}"
Get the latest softwareÂ
Machine Policy Retrieval and Evaluation
Invoke-WMIMethod -Namespace root\ccm -Class SMS_CLIENT -Name TriggerSchedule "{00000000-0000-0000-0000-000000000022}"