I've failed, and need some help. I looked a a lot of web sites, and tried several things none of which seemed to help get diagnostics, so I finally settled on this, which doesn't seem to give me any output: ------------------------ $NewDFSR = import-csv -Delimiter "`t" c:\Batchfiles\data\NewDFSR.csv New-DfsReplicationGroup -GroupName US2AU-Engineering $GroupName = Get-DfsReplicationGroup US2AU-Engineering Foreach ($Line in $NewDFSR) { $GroupName = $Line.GroupName $SourceComputer = $Line.SourceComputer $FolderName = $Line.FolderName $SourceContentPath = $Line.SourceContentPath $SourceStagingPathQuotaInMB = $Line.SourceStagingPathQuotaInMB $SourcePrimaryMember = [System.Convert]::ToBoolean($Line.SourcePrimaryMember) $DestinationComputer = $Line.DestinationComputer $DestinationContentPath = $Line.DestinationContentPath $DestinationReadOnly = [System.Convert]::ToBoolean($Line.DestinationReadOnly)
New-DfsReplicatedFolder -GroupName $GroupName -FolderName $FolderName * Try { Add-DfsrMember -GroupName $GroupName -ComputerName $SourceComputer, $DestinationComputer } Catch [Exception] { write-host $_.Exception|format-list -force }* Add-DfsrConnection -GroupName $GroupName -SourceComputerName $SourceComputer -DestinationComputerName $DestinationComputer Set-DfsrMembership -GroupName $GroupName -FolderName $FolderName -ComputerName $SourceComputer -ContentPath $SourceContentPath -PrimaryMember $SourcePrimaryMember -StagingPathQuotaInMB $SourceStagingPathQuotaInMB -Force Set-DfsrMembership -GroupName $GroupName -FolderName $FolderName -ComputerName $DestinationComputer -ContentPath $DestinationContentPath -ReadOnly $DestinationReadOnly -Force } Set-DfsrConnectionSchedule -GroupName "US2AU-EngDrops" -SourceComputerName "zusfs01p" -DestinationComputerName "zaufs01p" -Day 1,2,3,4,5 -BandwidthDetail "ffffffffffffffffffffffffffffffffffff66666666666666666666666666666666ffffffffffffffffffffffffffff" Update-DfsrConfigurationFromAD -ComputerName $SourceComputer,$DestinationComputer ------------------------ Output from the script (I used a single line in the CSV) is: ---------- GroupName : US2AU-Engineering DomainName : example.com Identifier : 77fe8261-ab6a-4041-b7b2-c8805410ebc3 Description : State : Normal GroupName : US2AU-Engineering FolderName : Folder1 DomainName : example.com Identifier : e8870682-624d-4f81-a0b8-3360aec13283 Description : FileNameToExclude : {~*, *.bak, *.tmp} DirectoryNameToExclude : {} DfsnPath : IsDfsnPathPublished : False State : Normal GroupName : US2AU-Engineering ComputerName : USFS01P DomainName : example.com Identifier : faccf9f0-e35b-4935-a431-5c08bde03e78 Description : DnsName : USFS01p.example.com Site : ExampleUS NumberOfConnections : 0 NumberOfInboundConnections : 0 NumberOfOutboundConnections : 0 NumberOfInterSiteConnections : 0 NumberOfIntraSiteConnections : 0 IsClusterNode : False State : Normal *Add-DfsrMember : Could not add the computer to the replication group. Computer: AUFS01P Replication group: "US2AU-Engineering" The remote procedure call failedAt line:20 char:9+ Add-DfsrMember -GroupName $GroupName -ComputerName $SourceCom ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (AUFS01P:String) [Add-DfsrMember], DfsrException + FullyQualifiedErrorId : Add-DfsrMember.NonTerminatingOMException,Microsoft.DistributedFileSystemReplication.Commands.AddDfsrMemberCommand Add-DfsrConnection : The connection could not be added because DFS Replication could not find at least one source and one destination computer in the replication group, or because the source and destination computers were the same. Source computer: USFS01P Destination computer: AUFS01P Replication group: "US2AU-Engineering"At line:26 char:5+ Add-DfsrConnection -GroupName $GroupName -SourceComputerName $Sou ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Add-DfsrConnection], DfsrException + FullyQualifiedErrorId : Add-DfsrConnection.NoDistinctMemberPairs,Microsoft.DistributedFileSystemReplication.Commands.AddDfsrConnectionCommand* GroupName : US2AU-Engineering ComputerName : USFS01P FolderName : Folder1 GroupDomainName : example.com ComputerDomainName : example.com Identifier : c31d0a9a-cdb4-469e-b6c8-52f399130f6b DistinguishedName : CN=e8870682-624d-4f81-a0b8-3360aec13283,CN=89849645-74a6-4a66-b4f4-50e947995b28,CN=DFSR-LocalSettings,CN=USFS01P,OU=servers,OU=exampleUS,DC=example,DC=com ContentPath : K:\Engineering\TC\ASB39.3\CurrentVersions PrimaryMember : True StagingPath : K:\Engineering\TC\ASB39.3\CurrentVersions\DfsrPrivate\Staging StagingPathQuotaInMB : 7811 MinimumFileStagingSize : Size256KB ConflictAndDeletedPath : K:\Engineering\TC\ASB39.3\CurrentVersions\DfsrPrivate\ConflictAndDeleted ConflictAndDeletedQuotaInMB : 4096 ReadOnly : False RemoveDeletedFiles : False Enabled : True DfsnPath : State : Normal Set-DfsrMembership : Could not edit the DFSR membership with domain: ; replication group: "US2AU-Engineering"; replicated folder: "Folder1"; computer: AUFS01P; GUID: None specified. The remote procedure call failed At line:28 char:5 + Set-DfsrMembership -GroupName $GroupName -FolderName $FolderName ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (DFSR membership...None specified.:String) [Set-DfsrMembership], DfsrException + FullyQualifiedErrorId : Set-DfsrMembership.OMException,Microsoft.DistributedFileSystemReplication.Commands.SetDfsrMembershipCommand Set-DfsrConnectionSchedule : The replication schedule for the connection could not be edited because it could not be found in the replication group. Source computer: USfs01p Destination computer: AUfs01p Replication group: "US2AU-Engineering" At line:31 char:1 + Set-DfsrConnectionSchedule -GroupName "US2AU-Engineering" -SourceCompute ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (:) [Set-DfsrConnectionSchedule], DfsrException + FullyQualifiedErrorId : Set-DfsrConnectionSchedule.NotFound,Microsoft.DistributedFileSystemReplication.Commands.SetDfsrConnectionScheduleCommand ---------- On Fri, Jul 21, 2017 at 8:27 PM, Michael B. Smith <mich...@smithcons.com> wrote: > What is the InnerException of the error? > > -----Original Message----- > From: listsad...@lists.myitforum.com [mailto:listsadmin@lists. > myitforum.com] On Behalf Of Kurt Buff > Sent: Friday, July 21, 2017 11:11 PM > To: ntsysadm > Subject: [NTSysADM] RPC not available on remote machine while doing DFSR > config > > All, > > I'm re-doing the DFSR config for the file servers in our US and AU > offices. The US has a bunch of directories that will be replicated to AU > (but not back). No big deal, but the PowerShell script I'm writing is > killing me. I don't know if I'm running into a time out problem, or what it > might be. > > I'm running the script from Redmond on my laptop. > > Here's the script, which should Just Work(tm): > ---------- > $NewDFSR = import-csv -Delimiter "`t" c:\Batchfiles\data\NewDFSR.csv > > New-DfsReplicationGroup -GroupName US2AU-Engineering > $GroupName = Get-DfsReplicationGroup US2AU-Engineering > > Foreach ($Line in $NewDFSR) > { > $GroupName = $Line.GroupName > $SourceComputer = $Line.SourceComputer > $FolderName = $Line.FolderName > $SourceContentPath = $Line.SourceContentPath > $SourceStagingPathQuotaInMB = $Line.SourceStagingPathQuotaInMB > $SourcePrimaryMember = > [System.Convert]::ToBoolean($Line.SourcePrimaryMember) > $DestinationComputer = $Line.DestinationComputer > $DestinationContentPath = $Line.DestinationContentPath > $DestinationReadOnly = > [System.Convert]::ToBoolean($Line.$Line.DestinationReadOnly) > > New-DfsReplicatedFolder -GroupName $GroupName -FolderName $FolderName > Add-DfsrMember -GroupName $GroupName -ComputerName $SourceComputer, > $DestinationComputer > Add-DfsrConnection -GroupName $GroupName -SourceComputerName > $SourceComputer -DestinationComputerName $DestinationComputer > Set-DfsrMembership -GroupName $GroupName -FolderName $FolderName > -ComputerName $SourceComputer -ContentPath $SourceContentPath > -PrimaryMember $SourcePrimaryMember -StagingPathQuotaInMB > $SourceStagingPathQuotaInMB -Force > Set-DfsrMembership -GroupName $GroupName -FolderName $FolderName > -ComputerName $DestinationComputer -ContentPath $DestinationContentPath > -ReadOnly $DestinationReadOnly -Force > } > ---------- > > But it fails the Add-DfsrMember command, when trying to add the AU file > server: > ---------- > Add-DfsrMember : Could not add the computer to the replication group. > Computer: ZAUFS01P Replication group: "US2AU-Engineering" The remote > procedure call failed > At C:\BatchFiles\New-DfsrConfiguration.ps1:19 char:2 > + Add-DfsrMember -GroupName $GroupName -ComputerName $SourceCompute > ... > + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + CategoryInfo : NotSpecified: (ZAUFS01P:String) > [Add-DfsrMember], DfsrException > + FullyQualifiedErrorId : > Add-DfsrMember.NonTerminatingOMException,Microsoft. > DistributedFileSystemReplication.Commands.AddDfsrMemberCommand > ---------- > > However, if I RDP to that file server, I see this, which to me indicates > that it *is* listening: > ---------- > C:\Windows\system32>winrm enumerate winrm/config/listener > Listener [Source="GPO"] > Address = * > Transport = HTTP > Port = 5985 > Hostname > Enabled = true > URLPrefix = wsman > CertificateThumbprint > ListeningOn = 10.212.1.30, 127.0.0.1, ::1, > fe80::a9e7:6f85:8115:b4ed%16 > ---------- > > Heck, I even stood up wireshark on my laptop, from which I'm running this > script, and see traffic to that server, though I can't quite figure out the > conversation - but I have a 48kb capture file detailing the transaction for > the attempted configuration of a single directory, if anyone wants that. > > Kurt > > >