Jump to content


  • 0
JakesSA

vb script concerns regarding my SCCM clients plz help

Question

Hi All,

 

I've notice my SCCM clients not responing to my main server. So I started looking and notice the following in our login script. I'm not a expert in scripting but please explain to me what will the following do to my SCCM clients

 

==================

Sub SMSSite()

Dim smsClient, inParam, result

If Site <> "DurbanPlessey" OR Site <> "Killarney" Then "This will only exclude these sites"

Set smsClient = GetObject("winmgmts://127.0.0.1/root/ccm:SMS_Client")

Set inParam = smsClient.Methods_.Item("SetAssignedSite").inParameters.SpawnInstance_()

inParam.sSiteCode = "C00"

Set result = smsClient.ExecMethod_("SetAssignedSite", inParam)

End If

End Sub

==================

 

Advice will really be appreciated.

 

Thank you

Jakes

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

This script is just setting the site code C00 in your SCCM Client if the computer object is not located in the AD Sites DurbanPlessey or Killarney. Check the clientlocation.log on you clients to see if they can resolve the management point.

Share this post


Link to post
Share on other sites

  • 0

The loopback device is addressing the local machine. You can replace that by a simple dot which will have the same effect "winmgmts://./root/ccm:SMS_Client".

It's just a matter of personal preference.

I'm wondering though why this code snippet is placed in the logon script, since you need admin rights to change the site settings of the client.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.