Assigning Distribution Points via VBScript vs. SCCM Console
-
Thursday, April 12, 2012 5:45 PM
I have created a script that will assign the DPs to a package after it's creation (see below):
' Create distribution point object (this is not an actual distribution point). Set distributionPoint = objSWbemServices.Get("SMS_DistributionPoint").SpawnInstance_ ' Associate the existing package with the new distribution point object. distributionPoint.PackageID = packageID ' This query selects a single distribution point based on the provided SiteCode and ServerName. resourceQuery = "SELECT * FROM SMS_SystemResourceList WHERE RoleName='SMS Distribution Point'" Set allResources = objSWbemServices.ExecQuery(resourceQuery, , 48) For Each resource In allResources distributionPoint.ServerNALPath = resource.NALPath distributionPoint.SiteCode = site.SiteCode distributionPoint.PackageID = packageID distributionPoint.SiteName = site.SiteName distributionPoint.Put_ NextThis script works correctly as afterward I can look in the SCCM Console and all the DPs are there.... If I follow the wizard in SCCM and add the DPs, again, they all get added just fine... There is one difference though... If the DPs are added through the script, they are all in lower case letter, if they are added via the wizard, all but one of the DPs are in lower case letters...
So if the DPs are added with the script and then I try to use the wizard to remove/update/refresh them, the DP that has the case descrepancy will not appear in the wizard list, even though clearly it connected.
Has anyone seen this type of behavior?
- Edited by TLeanna Thursday, April 12, 2012 5:45 PM

