Change Replication Monitoring Interval to Multiple Days RRS feed

  • Question

  • I would like to figure out how to extend the period of time that my Hyper-V replication collects statistics for. I would like to extend it to cover multiple days so I have a better picture of the mx / average size of replication data before extending it over a WAN connection.  I found the following powershell command -

    Set-VMReplicationServer -MonitoringStartTime 06:00:00 -MonitoringInterval 12:00:00

    Which says I should be able to extend the interval by up to 7 days.  However, I cannot figure out what format I need to type in the numbers to make it monitor more than 1 day. If I try to put in 96:00:00 I get the following error -

    Set-VMReplicationServer : A parameter is invalid. Value for the monitoring interval is not valid. The value must be an
    even fraction (in hours) of a 24-hour day or whole days. The valid range is 1 hour to 7 days.
    At line:1 char:1
    + Set-VMReplicationServer -MonitoringStartTime 06:00:00 -MonitoringInterval 96:00: ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-VMReplicationServer], VirtualizationInvalidArgumentException
        + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetReplicationServerCommand

    WAIT!  I just found the answer, but I'm still going to post the question in case other people have this same issue.  The format for the interval to put in is DAYS.00:00:00, so in my case, I put in 6.00:00:00 and it took it, so hopefully it will work.  I'll check back in a few days.



    Friday, April 28, 2017 5:19 PM

All replies

  • Hi Sir,

    Glad to hear the problem has been resolved .

    Thanks for your sharing .

    Generally , if you got any concern with powershell command , you may check it in technet article for the details explanation for each parameter: 

    Best Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Saturday, April 29, 2017 12:25 PM
  • Just in case anyone stumbles across this.  I just applied this change to my new 2016 Hyper-V replication server.  After applying the change, my HTTPS certificate based replication reverted from my custom port to port 443.  Didn't notice it right away until a couple hours later and my VMs were going to "Warning" and "Critical".  Going into Hyper-V Settings confirmed that the port did revert back to default.  I adjusted it and it appears to be sticking.


    Monday, October 1, 2018 4:00 PM