Scripting of SCCM client configuration
Is there a way to "scripto-magically" set SCCM client configurations like the stuff on the Internet Tab?
Thanks - BH
Answers
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 SnippetOn 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 = NothingI'm sure others will chime in with their own thoughts.
I hope this helps!
Jim Bradbury
All Replies
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 SnippetOn 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 = NothingI'm sure others will chime in with their own thoughts.
I hope this helps!
Jim Bradbury
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
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.
Roger on the testing (did it a few times before replying). Is the SDK available yet? I haven't seen it.
BH
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).
FYI - This works very well for updating existing clients:
On Error Resume Next
Dim newInternetBasedManagementPointFQDN
Dim clientnewInternetBasedManagementPointFQDN = "myserver.mydomain.com"
Set client = CreateObject ("Microsoft.SMS.Client")
client.SetInternetManagementPointFQDN newInternetBasedManagementPointFQDNSet client = Nothing
Set internetBasedManagementPointFQDN = Nothing