A bit of followup.

If I run add-dfsmember (with the same parameters) on the DC in the AU
office, then it works for the local file server, and not for the file
server in the US..

Except when it works - about one time in five.

Even though I enables WSMAN via a GPO a long time ago, per this article:
https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.core/enable-psremoting?f=255&MSPPError=-2147217396

I ran "Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC"
-RemoteAddress Any", just in case, but that doesn't seem to make a
difference - and the Domain firewall is turned off anyway.

This begins to smell like a distance/timeout problem.

If that's the case, any ideas on how to work around that?

Kurt

On Sun, Apr 30, 2017 at 6:23 AM, Kurt Buff <kurt.b...@gmail.com> wrote:
> Bad email editing on my part, sorry for that.
>
> In the script they do match.
>
> Kurt
>
> On Sun, Apr 30, 2017 at 5:23 AM, Webster <webs...@carlwebster.com> wrote:
>> To me, it looks like the variable name you used ($SourceComputer) is not the 
>> same the error is showing ($SourceComputerNam...)
>>
>>
>> Webster
>>
>> -----Original Message-----
>> From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] 
>> On Behalf Of Kurt Buff
>> Sent: Sunday, April 30, 2017 2:44 AM
>> To: powershell@lists.myitforum.com
>> Subject: [powershell] Error with powershell and Add-DfsrMember
>>
>> I'm setting up DFSR between two file servers. The following line in the 
>> script updates the US server ($SourceComputer), but fails with the message 
>> shown against the AU server ($DestinationComputer). I'm a bit stumped.
>>
>>      Add-DfsrMember -GroupName $GroupName -ComputerName 
>> $SourceComputer,$DestinationComputer
>>
>>      Add-DfsrMember : Could not add the computer to the replication group. 
>> Computer: AUFS01P Replication group: "InfrastructureSoftware"
>> The remote procedure call failed
>>      At line:1 char:1
>>      + Add-DfsrMember -GroupName $GroupName -ComputerName $SourceComputerNam 
>> ...
>>      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>          + CategoryInfo          : NotSpecified: (AUFS01P:String)
>> [Add-DfsrMember], DfsrException
>>          + FullyQualifiedErrorId :
>> Add-DfsrMember.NonTerminatingOMException,Microsoft.DistributedFileSystemReplication.Commands.AddDfsrMemberCommand
>>
>> I've checked GPOs, and the same GPOs are applied to both machines.
>> I've checked the firewall, and it's WFO (which I intend to fix at some 
>> point). I've also run enable-psremoting on the machine.
>>
>> I've verified that the varial $DestinationComputer contains the correct 
>> machine.
>>
>> What else should I be checking?
>>
>> More context from the script can be provided if desired.
>>
>> Kurt
>>
>>
>>
>>
>
>
>



Reply via email to