Trigger Manual DEP Sync With Powershell
Greetings fellow admins! Here is another good one that I spent a few hours digging into WMI and SMSProv verbose logging. Plus some random WMI class calls. Hopefully this will help you fill in somethings missing from the SDK/MSDN documentation. $wmidate = new-object -com Wbemscripting.swbemdatetime $date = get-date -format g $wmidate . SetVarDate( $date , $true ) [ void ] ( $thisInstance = ( [ wmiclass ] " \\localhost\root\sms\site_COP:SMS_ActionAccountResult " ) . createinstance() ) [ void ] ( $thisInstance . ActionID = 1 ) [ void ] ( $thisInstance . StartTime = $wmidate . value) [ void ] ( $thisInstance . Put()) $date = get-date -format g $wmidate . SetVarDate( $date , $true ) [ void ] ( $thisInstance = ( [ wmiclass ] " \\localhost\root\sms\site_COP:SMS_ActionAccountResult " ) . createinstance() ) [ void ] ( $thisInstance . ActionID = 2 ) [ void ] ( $thisInstance . ActionData = 'syncType,fullSyn...