When creating a new DFS folder and target using PowerShell on a Server 2012 Datacentre box I am getting some strange behaviour.
For instance, the following command:
New-DfsnFolder -Path "\\<DFS_ROOT>\data\it\imaging\<USERNAME>" -TargetPath "\\<SERVER>\<SHARE>\<USERNAME>"
Instead of getting the correct target, what I actually get is "\\<SERVER>\<SHARE>". In other words it chops off the "<USERNAME>" at the end. The path is always correct, but the target is always wrong, so if I script
this for 400 users the folders are all created but they all point at the folder above! At first I thought this might be something odd with the shares on our Isilon boxes but I get the same behaviour if I create a share on my C drive, and then trying and point
to a folder beneath this share, the target ends up pointing at the share rather than the folder it contains!
If I do it via the GUI it works perfectly. I am assuming I am missing something from the command but I fail to see what this could be.
Any assistance with this would be greatly appreciated.
Howard