Monday, May 4, 2009

Assigning Advanced Clients from the Command Prompt

I've found this and it may useful to some people.

Assigning Advanced Clients from the Command Prompt
You can assign Advanced Clients to SMS sites by running a script at the command prompt. The Advanced Client has a scripting object (Microsoft.SMS.Client) that you can use to do this. This object is installed with the Advanced Client software. For more information, see the Microsoft Systems Management Server 2003 Software Development Kit.

The following example demonstrates several of the Advanced Client scripting methods.

Set smsclient = CreateObject("Microsoft.SMS.Client")
oldsite = smsclient.GetAssignedSite
wscript.echo oldsite
smsclient.EnableAutoAssignment(True)
'or:
smsclient.SetAssignedSite("NES")
Adjust the script as necessary for your specific requirements.

No comments:

Post a Comment