Quantcast
Channel: Windows Server
Viewing all articles
Browse latest Browse all 26364

SCCM 2012 remotely trigger schedules

$
0
0

I need to run the application deployment and machine policy retrieval and evaluation cycle remotely on some PCs. I came up with this:

Powershell
Try{$computer="computer123"$SCCMClient=[wmiclass]"\\$computer\root\ccm:SMS_client"Write-Host"Application Deployment Evaluation Cycle"$SCCMClient.TriggerSchedule("{00000000-0000-0000-0000-000000000121}")Write-Host"Machine Policy Retrieval and Evaluation Cycle"$SCCMClient.TriggerSchedule("{00000000-0000-0000-0000-000000000021}")}catch[System.Management.Automation.PSInvalidCastException]{Write-Host"'$computer' is dead"}

However I'm not sure how to check if this ran correctly as the output comes up with:

Text
__GENUS : 1__CLASS : __PARAMETERS__SUPERCLASS : __DYNASTY : __PARAMETERS__RELPATH : __PARAMETERS__PROPERTY_COUNT : 1__DERIVATION : {}__SERVER : computer123__NAMESPACE : ROOT\ccm__PATH...

Viewing all articles
Browse latest Browse all 26364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>