This script starts the upload software usage data process to the SMS server from the SMS Advanced Client, where the script is run.

This script uses the Advanced Client Control Panel CPAppletMgr object to get ClientActions collection object. The clientActions collection is iterated through to find and run the software metering usage report cycle action.

You can change the oClientAction.Name property to Machine Policy Retrieval and Evaluation Cycle to start the software metering policy download from the SMS site server.

For additional information about uploading or download usage data, see the SMS 2003 SDK.

Example

On Error Resume Next

Dim oCPAppletMgr	'Control Applet manager object.
Dim oClientAction   'Individual client action.
Dim oClientActions  'A collection of client actions.


'Get the Control Panel applet manager object.
Set  oCPAppletMgr=CreateObject("CPApplet.CPAppletMgr")
If err.number <> 0 Then
	Wscript.echo "Couldn't create control panel application manager"
	wscript.quit
End If

'Get a collection of actions.

Set colClientActions=oCPAppletMgr.GetClientActions
If err.number<>0 Then
	wscript.echo "Couldn't get the client actions"
	Set oCPAppletMgr=Nothing
	wscript.quit
End If

'Display each client action name, and perform it.
For Each oClientAction In colClientActions

	If oClientAction.name="Software Metering Usage Report Cycle" Then
		wscript.echo "Performing " & oClientAction.name
		oClientAction.PerformAction

	End If
Next

Compiling the Code

  • Requires an SMS 2003 Advanced Client.

See Also