question

NickT-8059 avatar image
0 Votes"
NickT-8059 asked ·

DFSR - Setting MaxOfflineTimeInDays resets RPC port

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?

windows-server-powershell
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered ·
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.