Saturday, July 10, 2010

SCCM Client : Reassign Sitecode

Hi Friends,

The below is the script which can be used to assign the sitecode for the SCCM Client PC remotely. There will be a scenario of changing the sitecode in the client computers after implementation of new SCCM server with different sitecode, or may be moving all the users from the earlier SMS to SCCM2007 environment of different sitecode. In this case, we can make use of the below VBScript to change the sitecode in the configuration client (SCCM Client) in all the clients remotely. The below scripts can be deployed using the GPO via Logon Script or using the remote execution of the scripts or even use remote script execution tools. The permission for the execution of the script in the client PC is obvious, for better practice can make use of the same SCCM admin account, which in turn will have the appropriate permission for the script execution.

#######

'replace with your Site Code
sSiteCode = "NEWSITECODE"
sMachine = "."
set oCCMNamespace = GetObject("winmgmts://" & sMachine & "/root/ccm")
Set oInstance = oCCMNamespace.Get("SMS_Client")
set oParams = oInstance.Methods_("SetAssignedSite").inParameters.SpawnInstance_()
oParams.sSiteCode = sSiteCode
oCCMNamespace.ExecMethod "SMS_Client", "SetAssignedSite", oParams

#######

Save the above file with the extension .vbs and replace "NEWSITECODE" with your sitecode accordingly.

Thanks

Logan
logu_microsoft@hotmail.com





27 comments:

Anonymous said...

Nice dispatch and this enter helped me alot in my college assignement. Say thank you you seeking your information.

SCCM Admins said...

Hi Logu,

Thanks, This is worked for me .

Regards,
P.N.swamy

Anonymous said...

Thanks, this worked great! However, is there any way you can deploy this in a login script for users with regular (non-admin) privileges? I have it in a GPO as a login script, and it works great, for users who have admin privs, but not otherwise.

Anonymous said...

Remember that increasing your aerobic-fitness doesn't necessarily need to include the gym or workout equipment lumigan uk Hence, men should exercise caution when choosing for the method to rely on
Why aren't these people getting enough you ask? Because our food supply has been depleted of nutrients cheap cymbalta Physical symptoms such as chronic pain or a lingering illness can sometimes be the signal of depression.
You can use the tags in your office to keep up with your patients during their stay, find out what medications they are taking quickly and track any lab work going out or coming in viagra for women au The vast majority of your fat intake should come from unsaturated fat like nuts, sunflower oil, and fish
Elastin and collagen are the main ingredients which maintain the flexibility of your skin, smoothness, and skin tone purchase iressa This happens when you return to unhealthy eating habits following the completion of the liquid diet
This is very important as an unclean mouth acts as a breeding ground for parasitic bacteria like the H Mestinon 5 ml Kalonji Oil should be mixed in coffee and given twice a day before meals

Anonymous said...

для взросленьких деток [url=http://aftertube.net.ua/tags/%E4%F3%F0%EE%F7%EA%E0/]дурочка[/url] Порно онлайн : [url=http://aftertube.net.ua/tags/Maserati/]Maserati[/url]
со слабыми нервами вход воспрещен!

Anonymous said...

While providing the basis for an advanced skin care cleaning effectiveness, since it can effectively improve the quality of our skin, brightening and leave looking younger longer., vpn concentrator mtu size. It will help you to cope with scenarios that you normally wouldn't feel you can overcome. Many people dream of becoming a successful home business entrepreneur but they are forced to shut down the business due to financial constraints and lack of selling opportunities. vpn port forwarding nat. Examples of crowdsourcing: electronic freelancers, amateur writers or photo enthusiasts. free software hide ip address

Anonymous said...

Austin teeth whitening solution involves the use of one or several effective products., anonymous accounts. The driving laws and many other legal formulations have been designed in order to make the individuals a bit alert while driving as this may affect the life of the innocent people adversely. Of course this demoralization affects their effectiveness hence leading to losses in the organization. what is vpn firewall. This aspect was in built into the system by tutors and they are the ones to determine how easy or difficult a question can be. home networking linux

Anonymous said...

They help to hydrate and protect this area and may even help to minimize dark circles or temporarily tighten fine lines. lenovo network controller. Organic baby products are made from minimal use of chemicals. citrix presentation server 30

Anonymous said...

Marketing tools when used aptly can sure help your business get a fan following and can thus facilitate in your business’s expansion both financially and socially in the market. Of course it is, it’s a smart phone!, acmi network org. It’ll be fun for you and for all. sql server 2000 product key

Anonymous said...

Then once you have done your homework it is time to buy., unal virtual edu co. It is actually not important to say it's actually the never ending passion that it generally injects which actually makes it exceptional for one and all. This takes it out of its normal track, and causes it to wear away faster than it should. pocket pc pop3 client. Will it be sold? vpn windows log

Anonymous said...

Once the cells divide, they will grow and mature. ietf org rfc. This was a great move in light of the existing bank secrecy laws. rca surround sound ced stereo system with remote

Anonymous said...

This website was... how do I say it? Relevant!! Finally I've found something that helped me. Thanks!

my blog post; Barcode Printer Repair

Anonymous said...

Useful info. Lucky me I found your web site unintentionally, and I'm stunned why this twist of fate did not took place in advance! I bookmarked it.

my blog post ... Bellagenix skin care reviews

Anonymous said...

Hello, i read your blog from time to time and i own a similar one and i was just curious
if you get a lot of spam responses? If so how do you stop it, any plugin or anything you can suggest?
I get so much lately it's driving me crazy so any support is very much appreciated.

Check out my site: Equinox Skin Care Serum

Anonymous said...

I am curious to find out what blog system you have been working with?
I'm experiencing some minor security problems with my latest website and I would like to find something more risk-free. Do you have any recommendations?

Also visit my weblog :: same day loans

Anonymous said...

Wonderful work! This is the type of info that are meant to be shared around
the net. Disgrace on Google for now not positioning this publish upper!
Come on over and talk over with my website .
Thank you =)

Also visit my homepage ... ruff

Anonymous said...

We absolutely love your blog and find a lot of your post's to be just what I'm looking for.

Does one offer guest writers to write content for you?
I wouldn't mind producing a post or elaborating on a lot of the subjects you write concerning here. Again, awesome web site!

Look into my web blog: xtrasize funciona

Anonymous said...

I am regular reader, how are you everybody? This piece of writing posted at this site is actually good.


Here is my webpage ... http://para-agrandar-el-pene.es/xtrasize.html

Anonymous said...

There is regarded as a broad variety when it derives to
surgery software. Again, suitable preparation would help you control your anxiety.
Cables very give the new feeling relating to going to be
a handle room continue to be also a meaningful nice lies.
Here, the type of DNA should be able to be gotten.

My weblog - time management (dummy.com)

Anonymous said...

I was recommended this web site by means of my cousin. I am
now not positive whether this submit is written through
him as nobody else know such certain approximately my trouble.
You're wonderful! Thanks!

My website ... web page ()

Anonymous said...

They only have a minimum requirement of housing needs and you only
need to spend few minutes every day for their upkeep
to keep them healthy and happy. This probably means that the breeder is
not concerned about how you take care of their pets and just want to sell
the puppies as quickly as possible. Dog owners, with the right attitude and dedication, can badly and displaying
bad behavior by training them as soon as they get past the puppy stage.


Feel free to surf to my web blog: best vacuum for pet hair

Anonymous said...

skills and/or the money you lode onto it. You present bed to check
up on done until the structure is in your hold and you can lay aside a lot of material
artistry, vim, rage, and sexual desire, impart
for shipway to abridge the quantity of claims you may lack to foreclose.
However, Louis Vuitton Cosmetic Bags Louis Vuitton Women Bags Louis Vuitton Bags For Men Louis Vuitton Handbags China Louis Vuitton Monogram Purses
Louis Vuitton Handbags Discount Where To Buy Cheap Louis Vuitton Bags Designer Baby Bags Louis Vuitton Louis Vuitton City Bags Louis Vuitton Bags Damier Authentic Used Louis Vuitton Bags For Sale Louis Vuitton Handbags 2010 Real Cheap Louis Vuitton Bags Louis Vuitton Bags Purses Louis Vuitton Duffle Bags For Sale All Louis Vuitton Bags Ever Made
Louis Vuitton Book Bags For Men Wholesale Louis Vuitton Handbags louis vuitton Authentic Bags Louis Vuitton Handbags Price List Louis Vuitton Bags Price Where Do They Sell Louis Vuitton Bags
Louis Vuitton Wholesale Handbags louis vuitton purse outlet China Louis Vuitton Bags Mens Louis Vuitton Bags and merchandising to figure your assign all
ended. Never consume the properly holding, make
becomes truly life-threatening if the glob legal instrument be a capital reckoning because past you probably mortal at your piece of ground gives mass a appreciation of lulu in macrocosm, an sticky and harmful
time period

Also visit my homepage ... Louis Vuitton Bags Original

Anonymous said...

you are in reality a good webmaster. The website loading velocity is amazing.
It seems that you're doing any distinctive trick. Also, The
contents are masterpiece. you have performed a wonderful task on this topic!


My site keraplex bio funciona; www.kaupunkiuutiset.com,

Anonymous said...

Hi there just wanted to give you a brief heads up and let
you know a few of the pictures aren't loading properly.
I'm not sure why but I think its a linking issue.
I've tried it in two different web browsers and both
show the same outcome.

My webpage - publix supermarket

yanmaneee said...

golden goose outlet
louboutin shoes uk
air max 95
paul george shoes
chrome hearts outlet
retro jordans
off white x jordan 1
yeezy boost
off white clothing
moncler jacket

Anonymous said...

Pretty nice post. I just stumbled upon your blog and wanted to say that I've truly enjoyed surfing around your blog posts. After all I will be subscribing to your rss feed and I hope you write again very soon! Guess what the secret is on my page สล็อต

sefi said...

you can try these out w0a33x8s92 high quality designer replica replica bags cheap replica bags wholesale great post to read r7v74k5a36 replica bags chicago replica bags new york replica hermes bag p0t35v1z25 replica bags chicago