Viewing posts tagged DFS

DFS links with PowerShell/.Net Native Interop

So as a follow up to my previous post about enumerating DFS namespaces with C#, here's a PowerShell wrapper around that function. It's implemented as a PowerShell advanced function with some Get-Help documentation. I hope you find it useful. (If you don't see any code below, try refreshing, Github can be hit or miss)

DFS links with C#/.Net Native Interop

I've been writing some software to manage DFS links from .Net and historically I've parsed the output of dfsutil.exe to get my information but this can be unreliable, so what to do? Win32 to the rescue with .Net native interop. This has been a painful process since I do not know C and have limited experience with the Win32 api so I hope this can help people. The code will return a List<struct> representing the information i want out of the DFS query: link name, array of target UNCs. Here's the gist.