The Add-CMDistributionPoint cmdlet in Configuration Manager sets an incorrect ServerRemoteName value


Consider the following scenario:
  • You use the Add-CMDistributionPoint PowerShell cmdlet that was introduced in Cumulative Update 1 for Microsoft System Center 2012 Configuration Manager Service Pack 1 (SP1) to create a new remote distribution point (DP).  
  • You deploy content to the new DP and then create a deployment that requires that content for a client in the same remote location as the new DP. 
In this scenario, you find that the client tries to download the content from the first server that is installed in the hierarchy (the CAS or stand-alone Primary). If the first server in the hierarchy is a stand-alone Primary that is a DP that is hosting the content, the client successfully downloads the content. This is shown by the DataTransferService.log entries on the client.


This occurs because the Add-CMDistributionPoint PowerShell cmdlet incorrectly sets the ServerRemoteName property for the distribution point to the fully qualified domain name (FQDN) of the first server in the hierarchy. Because of this, the client selects the best distribution point from which to download content. The client makes this choice based on locality (the same IP subnet, the same Active Directory site, and so on) but then uses the wrong FQDN to communicate with the DP.


To resolve this issue, install Cumulative Update 3 for System Center 2012 Configuration Manager Service Pack 1 (SP1). For more information about this cumulative update, click the following article number to view the article in the Microsoft Knowledge Base:  
2882125 Description of Cumulative Update 3 for System Center 2012 Configuration Manager Service Pack 1


You can work around the issue by correcting the ServerRemoteName property of the DP. The following VBScript sample will verify and correct this property as needed for one or more DPs:

'Sample script to connect to the SMS provider for a specific site server (argument 1)
' for a specific site code (argument 2) and
' and correct ServerRemoteName for a specified DP (argument 3) in a specified site (argument 4) if it does not match ServerName.

On Error Resume Next

'Validate command line arguments

Set args=wscript.arguments

If args.Count = 4 then
strProviderSiteServer = WScript.Arguments(0)
strProvSiteCode = UCASE(WScript.Arguments(1))
strDPServer = WScript.Arguments(2)
strDPSiteCode = UCASE(WScript.Arguments(3))
wscript.Echo "Incorrect command line arguments." & vbCrLf
wscript.Echo "Usage: cscript //nologo CorrectServerRemoteName.VBS <ProviderServer> <ProvSiteCode> <DPServer> <DPSiteCode>" & vbCrLf
wscript.Echo "Example: cscript //nologo CorrectServerRemoteName.VBS Server01 CAS DPServer PRI" & vbCrLf
End If

'Connect to the provider on the specified site server

strProviderSiteServer = "\\" + strProviderSiteServer + "\"
Set ObjSDKConn = GetObject("winmgmts:" & "{impersonationLevel=Impersonate,authenticationLevel=Pkt}!" & strProviderSiteServer & "root\sms\site_" & strProvSiteCode)

If Err.number <> 0 then
wscript.Echo "Connecting to the provider failed with code: " & Err.number
End If

'Query for the specified DP

strQuery = "Select * from SMS_SCI_SysResUse where RoleName='SMS Distribution Point' and SiteCode='" & strDPSiteCode & "' and NetworkOSPath like '%" & strDPServer & "%'"
Set ObjQueryResult = ObjSDKConn.ExecQuery(strQuery)

If Err.number <> 0 then
wscript.Echo "Querying for the specified DP server failed with code: " & Err.number
End If

If ObjQueryResult.Count < 1 Then
wscript.Echo "Querying for the specified DP server succeeded but no DPs were returned."
End If

'Loop through the list of DPs returned

wscript.Echo "Found " & ObjQueryResult.Count & " DPs matching the specified name."

For each ObjDP in ObjQueryResult
strServeName = Replace(ObjDP.NetworkOSPath,"\","")

For each ObjProp in ObjDP.Props
If ObjProp.PropertyName = "Server Remote Name" then
If strServeName = ObjProp.Value1 then
wscript.Echo "ServerName and ServerRemoteName both match as '" & strServeName & ". Not making any change to this DP."
wscript.Echo "ServerRemoteName for " & strServeName & " is " & ObjProp.Value1 & ". Correcting."
ObjProp.Value1 = strServeName

If Err.number <> 0 then
wscript.Echo "Saving the change failed with code: " & Err.number
wscript.Echo "Successfully updated the property."
End If
End If
End If

More Information

A fix for this issue is scheduled to be included in a future update for the product.

Makale No: 2935813 - Son İnceleme: 25 Şub 2014 - Düzeltme: 1

Geri bildirim