Skip to content

Instantly share code, notes, and snippets.

@dstreefkerk
Last active March 19, 2021 01:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstreefkerk/cc3c1eaf61d301b2e422a61b479c09b0 to your computer and use it in GitHub Desktop.
Save dstreefkerk/cc3c1eaf61d301b2e422a61b479c09b0 to your computer and use it in GitHub Desktop.
Get a list of active DFS folder targets under a specific DFS root
Get-DfsnFolder -Path \\internal.contoso.com\dfsroot\* | Get-DfsnFolderTarget | ? {$_.State -eq "Online"} | Group-Object -Property Path | ForEach-Object {$_.group[0]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment