L?nh ghp ng?n Add-CMDistributionPoint trong c?u h?nh qu?n l? ?t m?t gi tr? khng chnh xc ServerRemoteName

D?ch tiu ? D?ch tiu ?
ID c?a bi: 2935813 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

Tri?u ch?ng

Xem xt k?ch b?n sau y:
  • B?n s? d?ng cc CMDistributionPoint thm L?nh ghp ng?n PowerShell m ? ?c gi?i thi?u trong Cumulative Update 1 cho Microsoft h? th?ng Trung tm 2012 c?u h?nh qu?n l? Service Pack 1 (SP1) ? t?o ra m?t i?m phn ph?i t? xa m?i (DP).
  • B?n tri?n khai n?i dung ? DP m?i v sau t?o ra m?t ?t ho?t ?ng ?i h?i n?i dung cho m?t khch hng trong cng m?t v? tr t? xa nh DP m?i.
Trong tr?ng h?p ny, b?n t?m th?y r?ng khch hng c? g?ng ? t?i n?i dung t? my ch? ?u tin ?c ci ?t chuyn bi?t trong h? th?ng phn c?p (CAS ho?c ?c l?p ti?u). N?u my ch? ?u tin trong h? th?ng phn c?p l m?t ti?u h?c ?c l?p l m?t DP lu tr? n?i dung, cc khch hng thnh cng t?i n?i dung. i?u ny ?c th? hi?n b?ng cc m?c DataTransferService.log trn my tnh khch.

Nguyn nhn

i?u ny x?y ra b?i v? l?nh ghp ng?n PowerShell Thm-CMDistributionPoint khng chnh xc b? b?t ?ng s?nerverRemoteNameScho cc i?m phn ph?i ? tn mi?n ?y ? i?u ki?n (FQDN) c?a my ch? ?u tin trong h? th?ng. B?i v? i?u ny, khch hng ch?n i?m phn ph?i t?t nh?t m t? ? t?i n?i dung. Khch hng lm cho s? l?a ch?n ny d?a trn ?a phng (m?ng con IP cng, cng m?t ho?t ?ng Th muc Site, v vv.) nhng sau s? d?ng FQDN sai ? giao ti?p v?i DP.

Gi?i php

? gi?i quy?t v?n ? ny, ci ?t chuyn bi?t Cumulative Update 3 forSystem Trung tm 2012 c?u h?nh qu?n l? Service Pack 1 (SP1).? bi?t thm chi ti?t v? b?n C?p Nh?t tch l?y ny, nh?p vo s? bi vi?t sau ? xem bi vi?t trong c s? ki?n th?c Microsoft:
2882125 M t? c?a Cumulative Update 3 cho h? th?ng Trung tm 2012 c?u h?nh qu?n l? Service Pack 1

Cch gi?i quy?t khc

B?n c th? lm vi?c xung quanh v?n ? b?ng cch s?a ch?a ti s?nerverRemoteNameS c?a DP. M?u VBScript sau s? xc minh v s?a ch?a ti s?n ny l c?n thi?t cho m?t ho?c nhi?u 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))
Else
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
WScript.Quit(1)
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
WScript.Quit(2)
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
WScript.Quit(3)
End If

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

'Loop through the list of DPs returned

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

For each ObjDP in ObjQueryResult
wscript.Echo
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."
Else
wscript.Echo "ServerRemoteName for " & strServeName & " is " & ObjProp.Value1 & ". Correcting."
ObjProp.Value1 = strServeName
ObjDP.Put_

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

Thng tin thm

M?t s?a ch?a cho v?n ? ny d? ki?n s? ?c bao g?m trong b?n C?p Nh?t trong tng lai cho cc s?n ph?m.

Thu?c tnh

ID c?a bi: 2935813 - L?n xem xt sau cng: 28 Thang Hai 2014 - Xem xt l?i: 1.1
p d?ng
  • Microsoft System Center 2012 Configuration Manager Service Pack 1
T? kha:
kbmt KB2935813 KbMtvi
My d?ch
QUAN TRONG: Bai vit nay c d?ch b?ng phn mm dich thu?t cua Microsoft va co th c Cng ng Microsoft chinh sa l?i thng qua cng ngh CTF thay vi mt bin dich vin chuyn nghip. Microsoft cung c?p cc bi vi?t ?c c? bin d?ch vin v ph?n m?m d?ch thu?t th?c hi?n v c?ng ?ng ch?nh s?a l?i ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng nhi?u ngn ng? Tuy nhin, bi vi?t do my d?ch hoc thm chi cng ng chinh sa sau khng ph?i lc no c?ng hon h?o. Cc bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny: 2935813

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com