Script for GPO to change SCCM client site ID

[sourcecode language=”vb”]
Option Explicit

Dim objSMSClient
Dim varSiteID

varSiteID = Wscript.Arguments.Named("SiteID")

If Trim(varSiteID) <> "" Then
Set objSMSClient = CreateObject("Microsoft.SMS.Client")
objSMSClient.SetAssignedSite(varSiteID)
End If

[/sourcecode]