How to Get or Set the Current SMS Advanced Client Site
Published : April 11, 2005
When run on an SMS Advanced Client, the following script can be used to get or set the client's assigned site code. The script uses the Advanced Client COM Automation object SMSClient to get the assigned site.
On This Page
Example
Compiling the Code
See Also
Example
On Error Resume Next Dim oSMSClient Set oSMSClient = CreateObject ("Microsoft.SMS.Client") If Err.Number <> 0 Then wscript.echo "Could not create SMS Client Object - quitting" wscript.quit End If wscript.echo "Assigned Site Code is : " & oSMSClient.GetAssignedSite 'You can use oSMSClient.SetAssignedSite to set the SMS site. Set oSMSClient=Nothing
Compiling the Code
- Requires an SMS 2003 Advanced Client.