myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


script for site assignment

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> script for site assignment Page: [1]
Login
Message << Older Topic   Newer Topic >>
script for site assignment - 6/19/2008 7:44:17 AM   
cxesam

 

Posts: 43
Score: 0
Joined: 10/29/2007
Status: offline
Hi

Does anyone perhaps know of a script i can use for my site assignments? I have a situation where my sccm clients are still reporting to my old site code (old sms server). I've disabled all function on my old server and deleted the SLP in my AD container. I need a "quick method" to rectify this. Any ideas please?
Post #: 1
RE: script for site assignment - 6/19/2008 8:45:54 AM   
wbracken


Posts: 1006
Score: 22
Joined: 4/12/2002
From: St. Louis
Status: offline
Here's a script I used when I rebuilt the SMS 2003 infrastructure here.  Not tested against SCCM but worth a try:
*note the optinal CacheSize routine...you can leave that part out.

' =============================================================================
' /// Info
' =============================================================================
' USAGE: SMS CLIENT Redirect
' ScriptVersion = "1.0"
' =============================================================================
On Error Resume Next
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
Computer = WSHShell.ExpandEnvironmentStrings("%COMPUTERNAME%")
' =============================================================================    
'/// Prevent script from running on Current SMS Server (stl)
' =============================================================================
If Computer = "MYOLDSMSSERVER" Then
WScript.Quit
End if
' =============================================================================
' /// Set SMS SITE CODE to 001
' =============================================================================
Set smsClient = CreateObject("Microsoft.SMS.Client")    
smsClient.SetAssignedSite "001", 0
Set smsClient = Nothing
' =============================================================================
' /// Set Cache to 2048
' =============================================================================
Dim oUIResManager 
Dim oCache, CacheSize
CacheSize = 2048
Set oUIResManager = CreateObject("UIResource.UIResourceMgr")
If oUIResManager Is Nothing Then
   WScript.Quit
End If
Set oCache=oUIResManager.GetCacheInfo
If oCache Is Nothing Then
   Set oUIResManager=Nothing
WScript.Quit
End If
oCache.TotalSize=CacheSize
WScript.Quit


_____________________________

William Bracken

http://www.clientarchitect.com

(in reply to cxesam)
Post #: 2
RE: script for site assignment - 6/19/2008 9:02:27 AM   
cxesam

 

Posts: 43
Score: 0
Joined: 10/29/2007
Status: offline
Thanks William. I'll give it a try and will let you know. I'm opting to use GP as well as a last resort if all else fails.

(in reply to wbracken)
Post #: 3
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> script for site assignment Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.453