I have a full GUI installation of Windows Server 2012r2 2012 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?
EDIT: I just discovered that the server is actually running Windows Server 2012, not 2012r2. That's why the built-in DFSR module is not available. Updating to WMF/Powershell 5.1 does not make the new DFSR module available. I have updated the title, question, and tags on this post accordingly. One workaround is to install a third-party DFSR module.