none
Change Replication Monitoring Interval to Multiple Days

    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.

    Thanks!

    -Brad

    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:

    https://technet.microsoft.com/en-us/itpro/powershell/windows/hyper-v/set-vmreplicationserver?f=255&MSPPError=-2147217396 

    Best Regards,

    Elton 


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

    Saturday, April 29, 2017 12:25 PM
    Moderator