So here is the follow up on the previous blog.
I recreated the shares, check! Now it’s time to create the DFSn Links & targets!
Here’s the code to create the necessary links and targets:
Quick run down. The csv is straight forward Link, Target (tab delimited). I created a few checkpoints (again, better safe than sorry).First, I get a list of all actual DFS links & targets for reference. If the target doesn’t exist create it. That’s where the SMB share preparation came in 😉 If the link doesn’t exist create it. If the target exist, verify that it’s set to the specified link.
In my case I only have 1:1 Dfs link/target relationships. So this worked for me. Be sure to test this before trying it out in production.
I needed to recreate 1386 DFS links. This took a few minutes. 10 failed, not bad considering the amount. Now the old Irwin would have panicked at the sight of something going wrong (Whooosahhh). I kept it together and let script ride out. Once it was done I did my OVF to see which ones failed 😉
This is one of those rare instances that I created the missing links by hand (don’t judge me I was on a tight schedule). Turns out a few had some form of a special character in the name. Creating them by hand didn’t raise an issue.
Last but not least I wanted to generate a ReportUnit HTML of the DFSn test results. Generating the ReportUnit HTML file didn’t go as I expected. It did succeed in the end., but generating a HTML report for 2772 was a bit too much. Having said that…
Usage is pretty easy:
Here’s a quick screenshot of Format-Pester output:
Once I resolved the failed test, I ran the test again, nothing but purple and green!
So I learned that the size of the test when using ReportUnit.exe could be an issue, but if you want to do everything in PowerShell then Format-Pester is a better fit.
Hope it’s worth something to you