Assuming that there is a Domain-based DFS share path
\someDomainBasedDFSRoot\someLogicalSubfolder\someSubfolderCorrespondingToAPhysicalHost\folder\file.txt
I'd like to get the IP (or probably at least the physical host so it can be nslookup
ed) that is used to actually access such path in the end (after all preliminary AD/DFS negotiations and etc.).
What I've tried/found so far:
- https://stackoverflow.com/questions/16742822/how-to-find-the-server-hosting-a-file-in-a-windows-dfs-with-java - unfortunately, I was unable to get any useful information using DirectorySearcher, either due to the mentioned
you cannot get that attribute if you query Active Directory from a Global Catalog server, you need to query the specific server that contains that object (or follow referrals from the parent forest).
or because I just plainly lack the necessary access rights. - DFSN powershell module seems like a solid bet, but I am not sure how to exactly use it to get the necessary info
- Also, it seems that every DFS folder has a DFS tab on its (Windows Explorer) Properties Window, that seems to list some server info, but I am not sure that it is the actual physical host info, and so far I have failed to find a way to get it programmatically.