VBScript to Set your SMS 2003 Advanced Client Site Code
Simple script to change site code on a client.
----Begin VBScript----
On Error Resume Next
'Your site code goes here
siteCode = "xyz"
Dim oSMSClient
Set oSMSClient = CreateObject ("Microsoft.SMS.Client")
If Err.Number <> 0 Then
WScript.quit
End If
oSMSClient.SetAssignedSite siteCode
Set oSMSClient=Nothing
----End VBScript----
----Begin VBScript----
On Error Resume Next
'Your site code goes here
siteCode = "xyz"
Dim oSMSClient
Set oSMSClient = CreateObject ("Microsoft.SMS.Client")
If Err.Number <> 0 Then
WScript.quit
End If
oSMSClient.SetAssignedSite siteCode
Set oSMSClient=Nothing
----End VBScript----
Comments