so when I run the above code it does NOT error out, but when I double check by going to the DFS GUI, The Namespace folder “share” doesn’t show as replicated(even though it shows in the replicated folders below the namespace, and if I try try to use the GUI to perform the same task it says the share is already being replicated). Also, the namespace doesn’t list as published. The STRANGE thing is that data is replicated between the two $member servers, so does the GUI not work properly if you use powershell to setup DFSR? I’ve torn down and rebuilt this setup a number of times with the same results. Any help would be appreciated, this ones been eating my lunch and watching the TN radio video and reading the above articles it seems straightforward, but im clearly missing something.
Running 2012R2 on all four servers.
It is entirely possible you’re looking at a GUI bug. If the share is, in fact, replicating - then mission accomplished. I don’t know of a workaround for that, unfortunately.
Thanks for replying. In looking at it more this AM, if I go into the GUI after running the script, and open replication, and on the right select replicated folders, that’s where it states its not published. If I highlight the folder, right click and select “share and publish in namespace” either option will tell me its not possible b/c the folder is already created or you haven’t chosen to create any new shares. Now, if I delete the Namespace folder “Share” and go back through the exercise of sharing and publishing via the GUI, it creates the new “share” folder and everything shows as it should in the GUI.
So either I’m doing something wrong, ie additional, in my script or you are correct that the GUI is not working properly.
Its unfortunate b/c this process would be quite helpful as far as time saving, but once the environment is in the hands of a customer, they’ll more than likely be using the GUI and not PS, so I have to have the GUI right as well.
Guess I just need someone to test it and tell me I’m not crazy and that there is in fact a bug.
You need to use the DfsnPath parameter on New-DfsReplicatedFolder or Set-DfsReplicatedFolder to connect the DFS namespace folder to the replicated folder. It won’t happen without using the parameter.
Daniel, thanks so much for making my headache go away!!! That was it!! In reading the dfsr cmdlts, I never did, or would have made the connection between this optional setting and how it would affect the GUI. Wew, thanks again!
-DfsnPath
Specifies the DFS Namespace (DFSN) folder path of the replicated folder.
The DFSN folder path has no effect on replication. This property exists only as a descriptive convenience to administrators and DFS Replication service does not validate the value of this property.
Thank you Daniel. I have been working on this for a most of the day and this is the only place I found the answer. It seems the Microsoft examples on setting up a replicated DFS folder are missing this part of the command.
My problem was when I created the replication group, the DFS folder did not have the little green arrow indicating it was replicated and when clicking on “Replicate” I got an error saying it was already replicated. The replication was also working fine. Everything was good except how it appeared in the DFS Management GUI.
For the record this is the command that needs to be used, the bold parameters are what is missing from the examples out there that cause the problem