Skip to content

Instantly share code, notes, and snippets.

@timbodv
Created February 20, 2017 11:22
Show Gist options
  • Select an option

  • Save timbodv/5c7b43843e76c862da1f242231f448f8 to your computer and use it in GitHub Desktop.

Select an option

Save timbodv/5c7b43843e76c862da1f242231f448f8 to your computer and use it in GitHub Desktop.
Trigger an SCCM/CCM client action
# list of all client action trigger codes
# https://blogs.technet.microsoft.com/charlesa_us/2015/03/07/triggering-configmgr-client-actions-with-wmic-without-pesky-right-click-tools/
$assets = 'PC1', 'PC2', 'PC3', 'PC4', 'PC5'
foreach ($asset in $assets) {
$smsclient = [wmiclass] "\\$asset\root\ccm:sms_client"
$smsclient.TriggerSchedule('{00000000-0000-0000-0000-000000000021}')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment