I have a full GUI installation of Windows Server 2012r2 with the DFS Management snap-in installed for Server Manager. I want to use the DFSR module for Powershell to monitor DFS replication. However, this module and its associated commands are not available in Powershell:

PS C:\Windows\system32> Import-Module DFSR
Import-Module : The specified module 'DFSR' was not loaded because no valid module file was found in any module directory.

Here are two snippets from the output of the Powershell command Get-WindowsFeature to show which DFS features are installed.

[X] File And Storage Services                           FileAndStorage-Services        Installed
[X] File and iSCSI Services                         File-Services                  Installed
    [X] File Server                                 FS-FileServer                  Installed
    [ ] BranchCache for Network Files               FS-BranchCache                 Available
    [ ] Data Deduplication                          FS-Data-Deduplication          Available
    [ ] DFS Namespaces                              FS-DFS-Namespace               Available
    [X] DFS Replication                             FS-DFS-Replication             Installed
    [ ] File Server Resource Manager                FS-Resource-Manager            Available
    [ ] File Server VSS Agent Service               FS-VSS-Agent                   Available
    [ ] iSCSI Target Server                         FS-iSCSITarget-Server          Available
    [ ] iSCSI Target Storage Provider (VDS and V... iSCSITarget-VSS-VDS            Available
    [ ] Server for NFS                              FS-NFS-Service                 Available
[X] Storage Services                                Storage-Services               Installed


[X] File Services Tools                         RSAT-File-Services             Installed
    [X] DFS Management Tools                    RSAT-DFS-Mgmt-Con              Installed
    [ ] File Server Resource Manager Tools      RSAT-FSRM-Mgmt                 Available
    [ ] Services for Network File System Man... RSAT-NFS-Admin                 Available
    [ ] Share and Storage Management Tool       RSAT-CoreFile-Mgmt             Available

How do I install and access the DFSR module in Powershell?


from powershell echo $env:psmodulePath

this will give you the module folder path

DFSr module available here: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-DFS-Replication-e1c8d772

Instructions are listed in that link.

  • Allan, thank you for the response. However, I want to use the official Microsoft DFSR module, and the one linked in your answer is a third-party module that appears to have been superseded by an official module (see the link in my question). – Craig Finch Sep 1 '19 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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