4

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 nslookuped) 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:

  1. 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.
  2. DFSN powershell module seems like a solid bet, but I am not sure how to exactly use it to get the necessary info
  3. 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.
4
  • If you're not the administrator of this AD or fileshare setup, why do you need this info? If I were a sysadmin who had set this up, and I had a user still trying to purposefully do something to only one of the servers instead of the DFS share, I'd be looking to work with them to solve the actual problem they're trying to solve, probably in a different way.
    – mfinni
    Mar 2, 2021 at 16:51
  • @mfinni IP address information is required by our IT team to diagnose some networking issues. We obviously consider that just giving them host/share names is a much simpler and reliable (DHCP and etc.) approach, but that's what they want. That's why we'd like to have a way to easily 'nslookup' any DFS path. Mar 2, 2021 at 19:31
  • Well crud, IT should also have this info. You could also run TCPView, netstat, or a packet capture utility to see what machine you're being connected to
    – mfinni
    Mar 3, 2021 at 1:05
  • @EugenePodskal 3) yes the DFS tab in windows explorer will show you the server(s) hosting that particular folder, and which one is Active for you. Mar 3, 2021 at 1:59

1 Answer 1

2
+50

Since your IT is asking for this info to help you with a trouble you've brought to them, they should really be helping you out. From checking out Technet, it does appear that the DFS tab for a folder from an example machine should tell you what DFS server it's been referred to. I also discovered this nifty cmdline which shows the servers I'm actively connected to for all DFS files. It's got a lot of other options that might help you.

dfsutil /PktInfo

And with 2 more seconds Googling, I see that this is a duplicate question of Determine which DFS referral target a user is using, which I have now given the duplicate answer to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.