I am using Windows Server 2016 and am attempting to set the DFSR attribute MaxOfflineTimeInDays. The script line I am using is resetting the static RPC port I have set. To set the static RPC port I used the following cmdlet set-dfsrserviceconfiguration -rpcport <static rpc port number> I checked this using both get-dfsrserviceconfiguration and get-ciminstance -namespace root/microsoftdfs -query "select * from dfsrmachineconfig" I could not find a powershell cmdlet to set the maxofflinetimeofdays so I then run the following command to set the attribute set-ciminstance -namespace root/microsoftdfs -query "select maxofflinetimeindays from dfsrmachineconfig" -property @{maxofflinetimeindays=180} This has the side effect of resetting the RPCPort to 0 and setting the DynamicRPCPort to false in output from get-dfsrserviceconfiguration Conversely, using the command set-ciminstance -namespace root/microsoftdfs -query "select rpcportassignment from dfsrmachineconfig" -property @{rpcportassignment=<staticrpc port number} results in the maxofflinetimeindays being reset to the default (60 in my case) Using the command wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig Set MaxOfflineTimeInDays=180 does not result in the RPCPort being reset so I do have a way forward Any thoughts?