How To Manage Distributed Files System (DFS) Links With PowerShell

Distributed File System (DFS) Links make managing SMB file shares easier. DFS Links allow users and applications to access a “virtual path name” to connect to shared folders. This “virtual namespace” enables administrators to present shared folders located on different servers, or even change a shared folder’s location, completely transparent to the folder’s consumers. Users will not need to update their bookmarks and applications will not be required to be updated with new paths when you change a File Server.

In this video, we will show how PowerShell can reduce the time and complexity involved in the management of Distributed File System (DFS) Links. We will first discover all DFS Namespaces in our domain using the Get-DfsnRoot cmdlet. Then, we’ll learn how to create and update DFS links using the New-DfsnFolder and New-DfsnFolderTarget commands. As we close out this video, we’ll see how we can remove a folder target path using Remove-DfsnFolderTarget and then completely remove a decommissioned DFS link with Remove-DfsnFolder.

Prerequisites include:

  • Active Directory
  • File and Storage Services role installed
  • An administrator account with the proper permissions
  • RSAT Tools with the ‘File Services Tools - DFS Management Tools’ installed