Trying to write a powershell script to output the size of replication delta files in a Hyper-v environment, that will be run on a schedule, but when I run the following script the output file is populated with the following:
Microsoft.HyperV.PowerShell.VMReplicationHealth
script:
$csvfile = “.\VM_Status.csv”
$test = Measure-VMReplication
Add-Content -Path $csvfile -Value $test
How can I fix this? Output should be like this:
Name State Health LReplTime PReplSize(M) AvgLatency AvgReplSize(M) Relationship
---- ----- ------ --------- ------------ ---------- -------------- ------------
MAIL Replicating Normal 16/04/2018 8:53:09 AM 0.00 00:00:02 4.08 Simple
APP Replicating Normal 16/04/2018 8:53:43 AM 0.00 00:00:00 32.15 Simple
UTM Replicating Critical 11/04/2018 4:06:54 PM 0.00 0.00 Simple