Ask a questionAsk a question
 

AnswerScripting of SCCM client configuration

Answers

  • Monday, January 28, 2008 7:53 PMJim Bradbury [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    Bruce,

     

    Many of the settings are configurable and there are a number of examples in the SDK.  Check the Configuration Manager Client Programming section, and Configuration Manager Client Infrastructure in the SDK reference section. Some client settings can be set globally through site control file changes; there are examples spread throughout the various feature areas.  You can also find great examples of both server and client scripting over on myITforum.com.

     

    Re: The Internet Tab. Unfortunately, I haven't played with the proxy settings yet. However, here's a script to set the Internet-based management point (FQDN) that I wrote for one of my colleagues recently.

     

    Code Snippet

    On Error Resume Next

     

    ' Create varibles.
    Dim newInternetBasedManagementPointFQDN
    Dim client

     

    ' Set variable with the FQDN (this will be used to set the Internet-Based Management Point FQDN).
    newInternetBasedManagementPointFQDN = "mp.contoso.com"

     

    ' Create the client object.
    Set client = CreateObject ("Microsoft.SMS.Client")

     

    ' Output the current Internet-Based Management Point FQDN by calling the GetCurrentManagementPoint method.
    WScript.Echo "Current Internet-Based Management Point FQDN is : " & client.GetInternetManagementPointFQDN
    WScript.Echo " "

     

    ' Set the Internet-Based Management Point FQDN by calling the SetCurrentManagementPoint method.
    client.SetInternetManagementPointFQDN newInternetBasedManagementPointFQDN

     

    ' Output the current (new) Internet-Based Management Point FQDN by calling the GetCurrentManagementPoint method.
    WScript.Echo "Current Internet-Based Management Point FQDN is now : " & client.GetInternetManagementPointFQDN
    WScript.Echo " "

     

    ' Clear variables.    
    Set client = Nothing
    Set internetBasedManagementPointFQDN = Nothing

     

     

    I'm sure others will chime in with their own thoughts.

     

    I hope this helps!

     

    Jim Bradbury

All Replies

  • Monday, January 28, 2008 7:53 PMJim Bradbury [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    Bruce,

     

    Many of the settings are configurable and there are a number of examples in the SDK.  Check the Configuration Manager Client Programming section, and Configuration Manager Client Infrastructure in the SDK reference section. Some client settings can be set globally through site control file changes; there are examples spread throughout the various feature areas.  You can also find great examples of both server and client scripting over on myITforum.com.

     

    Re: The Internet Tab. Unfortunately, I haven't played with the proxy settings yet. However, here's a script to set the Internet-based management point (FQDN) that I wrote for one of my colleagues recently.

     

    Code Snippet

    On Error Resume Next

     

    ' Create varibles.
    Dim newInternetBasedManagementPointFQDN
    Dim client

     

    ' Set variable with the FQDN (this will be used to set the Internet-Based Management Point FQDN).
    newInternetBasedManagementPointFQDN = "mp.contoso.com"

     

    ' Create the client object.
    Set client = CreateObject ("Microsoft.SMS.Client")

     

    ' Output the current Internet-Based Management Point FQDN by calling the GetCurrentManagementPoint method.
    WScript.Echo "Current Internet-Based Management Point FQDN is : " & client.GetInternetManagementPointFQDN
    WScript.Echo " "

     

    ' Set the Internet-Based Management Point FQDN by calling the SetCurrentManagementPoint method.
    client.SetInternetManagementPointFQDN newInternetBasedManagementPointFQDN

     

    ' Output the current (new) Internet-Based Management Point FQDN by calling the GetCurrentManagementPoint method.
    WScript.Echo "Current Internet-Based Management Point FQDN is now : " & client.GetInternetManagementPointFQDN
    WScript.Echo " "

     

    ' Clear variables.    
    Set client = Nothing
    Set internetBasedManagementPointFQDN = Nothing

     

     

    I'm sure others will chime in with their own thoughts.

     

    I hope this helps!

     

    Jim Bradbury

  • Monday, January 28, 2008 10:22 PMBruce Hethcote Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    That did exactly the trick!

    I cleaned up the Echo statements and we'll be pushing it out to our "All Windows Laptops" collection so that they can getthis setting without having to reinstall the whole client.

     

    Thanks Jim!

     

    BH

  • Monday, January 28, 2008 10:29 PMJim Bradbury [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Don't forget to test!  My own testing is pretty superficial, so make sure that the script makes the changes that you expect AND that the behavior (in this case, on the client), is also what you expect before sending the script out broadly. 

     

  • Monday, January 28, 2008 10:35 PMBruce Hethcote Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Roger on the testing (did it a few times before replying).  Is the SDK available yet?  I haven't seen it.

     

    BH

  • Monday, January 28, 2008 10:46 PMJim Bradbury [MSFT]MSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Excellent! 

     

    The Configuration Manager SDK is still in beta, although we're working hard to finish it.  You can download the beta from the Microsoft Connect site (http://connect.microsoft.com). 

     

  • Monday, January 28, 2008 10:54 PMBruce Hethcote Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    FYI - This works very well for updating existing clients:

     

    On Error Resume Next
    Dim newInternetBasedManagementPointFQDN
    Dim client

    newInternetBasedManagementPointFQDN = "myserver.mydomain.com"
    Set client = CreateObject ("Microsoft.SMS.Client")
    client.SetInternetManagementPointFQDN newInternetBasedManagementPointFQDN

    Set client = Nothing
    Set internetBasedManagementPointFQDN = Nothing