Get IP of the Clients DFS Usage

I want to run a single line command on a Client or Server using PowerShell.

use the DFSUTIL /PKtinfo to get the active Server name. Then use that name to get the IP address. Displaying Server names and IPS on the same line.

What would the command be to gather this info?

Hi and welcome to the forum.
Can you please put a little more effort in to your post? It’s hard to tell if you’re asking a question, making a request, declaring a statement, etc?


You can store the output from “dfsutil /pktinfo” in a variable. The variable will be an array consisting of each row from the output. My recommendation would be to iterate through each entry, parsing each line and performing hostname resolution. Then store each entry into an array of hashtables.