|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
"Rich" wrote: > Does anyone have a login script that i could add into a GPO to change the > site code on all my workstations? Try this:- <<<<<<<<<<<<<<<>>>>>>>>>>>>>>> ' SiteChange.VBS - Force the SMS 2003 site ' Usage: ' Usage: SiteChange.VBS <SiteCode> on error resume next ' ' Get site code ' strNewSite = ucase(WScript.Arguments(0)) ' ' Connect to the machine's CCM namespace ' Set oSMSClient = GetObject("winmgmts://./root/ccm:SMS_Client") ' ' Set the machine's new site code ' Set inParam = oSMSClient.Methods_.Item("SetAssignedSite").inPara meters.SpawnInstance_() inParam.sSiteCode = strNewSite Set result = oSMSClient.ExecMethod_("SetAssignedSite", inParam) <<<<<<<<<<<<<<<>>>>>>>>>>>>>>> You need to supply one parameter, namely the new 3 letter site code. Regards, Tom Watson |
|