' ------------------------------------------------------------------------------------------------
' Perform all the SCCM Client Actions
' ------------------------------------------------------------------------------------------------
On Error Resume Next
Set objCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")
If Err.Number <> 0 Then
msgbox "There is no SCCM Client installed on this system.",16,"SCCM Client Actions -- FAILED --"
wscript.quit
End if
On Error Goto 0
' ------------------------------------------------------------------------------------------------
' Display the results
' ------------------------------------------------------------------------------------------------
Set arrClientActions = objCPAppletMgr.GetClientActions()
For Each objClientAction In arrClientActions
objClientAction.PerformAction
strText = strText & " -- Action: '" & objClientAction.Name & "' has been initiated successfully. " & vbCrLf
Next
strText = strText & vbcrlf & "Script engine: " & wscript.FullName & vbcrlf
msgbox strText,64,"SCCM Client Actions"
' ================================================================================================
' END SCRIPT
' ================================================================================================
Microsoft VBScript 编译错误。代码:800a0400。错误:- 预期语句
•
vbscript