• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 940
  • Last Modified:

Some help with Hyper-V Replication


We have a Hyper-V 2012 environment and I am just in the process of setting up Replication to our DR site.

I am using the GUI to do this which is going very well, now I would like to do our two SQL servers.  The logs and data are stored on different VHDs so I understand I need to use the "EnableWriteOrderPreservationAcrossDisks"

I have checked out the TechNet article on "Set-VMReplication" but I am very unfamiliar with PS and how I would form a script out of these commands to set up replication.

Can I set up replication via the GUI and then run "EnableWriteOrderPreservationAcrossDisks"?  Or is it not possible to use this cmdlet on it's own?

Many thanks
  • 2
1 Solution
Rob StoneCommented:
PowerShell is a great tool when you start using it.  If you have the time I would invest in learning the basics as as you've already noticed, some features just aren't in the GUI.

You can create a PowerShell script in the PowerShell ISE and it will help you construct the script with side bar and auto populations.

It is probably possible to create the Replication in the GUI and edit it afterwards, however, you would want to test this first on some test kit.

You would use Get-VMReplication to identify the replication you want to edit.

I'm afraid I don't have the hardware to test this out at present.

Remember, you can always put the -whatif command at the end of a PowerShell line to test the syntax without running the script.
admincbfAuthor Commented:
Many thanks for your reply.  I found the -WhatIf command very useful and came up with the following:

Set-VMReplication -VMName SQL1 -ReplicaServerName REP1 -ReplicaServerPort 80 -AuthenticationType Kerberos -CompressionEnabled $TRUE -EnableWriteOrderPreservationAcrossDisks $TRUE

Open in new window

Followed by:

Start-VMInitialReplication -VMName SQL1

Open in new window

Rob StoneCommented:
Great stuff.

As I said, if you have the time spend some time learning the basics. A few sites which I found good when learning PS were:

And for some excellent scripts which you can modify to suit your own needs:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now