次の方法で共有


Scripts to Assign and Delete the Clients' Internet-Based Management Point

I’ve been asked to recommend an alternative method of assigning the Internet-based management point to clients because my post Cannot Select Option for Branch Distribution Point in a Native Mode Site demonstrated that using the CCMHOSTNAME command-line property in the Client Push options can get you into trouble for a couple of reasons. First, if you’re installing a new client or upgrading from SMS 2003, this installation configuration registers the client with the InternetEnabled flag, which can’t be removed without deleting the client from the database. In this scenario, you can’t configure a client to be a branch distribution point, even after deleting the Internet-based management point FQDN in the client Configuration Manager Properties. Second, you cannot reinstall the client with a null value for CCMHOSTNAME.

Using CCMHOSTNAME to configure clients with the Internet-based management point is the right choice if you’re manually installing clients on the Internet, or clients that you want to be Internet-only. But it’s risky to configure all clients using CCMHOSTNAME (eg Client Push options) unless you’re sure you will not have to delete the value or do not mind performing the workaround, which results in losing all the history for the client.

So, given that manually specifying the Internet-based management point in the client properties (Internet tab) isn’t practical for a high number of clients, and if you want all new clients to be automatically configured for Internet-based client management – using software distribution to assign a script to run once is a good option. If you later identify clients that should not be configured for Internet-based client management (such as workstations that will become branch distribution points), you can assign a new script to them which deletes the value for the Internet-based management point.

We published such a script on this blog back in January this year (Tips, Tricks & Hints for Native Mode and Internet-Based Client Management - Part 1 of 3). Our SDK writer, Jim Bradbury, wrote this for us and I’ve since seen it posted elsewhere, which is a fine endorsement. We’ve also heard back from a number of customers who have confirmed that they successfully run the script, so we’re happy to remove the original disclaimers that we had when it was first posted.

The original script was written to provide output to confirm the configuration, but obviously this isn’t needed when you’re silently running it in an advertisement. To reference the full version with the user output, see the January post. For easy consumption, here’s the version without the user output, and we will be adding this to the R2 documentation update, for the task How to Assign Configuration Manager Client Computers to the Internet-Based Management Point.

 

On Error Resume Next

' Create variables.

Dim newInternetBasedManagementPointFQDN

Dim client

newInternetBasedManagementPointFQDN = "mp.contoso.com"

' Create the client COM object.

Set client = CreateObject ("Microsoft.SMS.Client")

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

client.SetInternetManagementPointFQDN newInternetBasedManagementPointFQDN

' Clear variables.

Set client = Nothing

Set internetBasedManagementPointFQDN = Nothing

 

Replace mp.contoso.com with the Internet FQDN of your Internet-based management point, and save the file with a .vbs extension.

The really neat thing about this script is that it can also remove the Internet-based management point – no need to delete the client to reset the IntenetEnabled flag, or uninstall/reinstall. Use the script above and remove the FQDN inside the quotation marks so that the line becomes: newInternetBasedManagementPointFQDN = ""

I found this scripting method so useful when I was doing my testing recently – with one script to set the Internet-based management point and another to delete it, quite happily flipping between the two without the need to uninstall or delete the client, or load the client properties. These scripts worked a treat, so I want to thank Jim yet again!

Although you might not be testing for the two different configurations, I would recommend configuring existing clients on the intranet with this script because it’s a lot safer than using CCMHOSTNAME, which is best used with clients on the Internet or clients that will be Internet-only.

 

- Carol Bailey

This posting is provided “AS IS” with no warranties and confers no rights.

Comments

  • Anonymous
    January 01, 2003
    The docs team for ConfigMgr 2007 has been busy releasing updated content and product clarifications recently