The essentials

Quick reference

One focused task per row. Jump to the related section for complete, working examples.

UseSyntaxExamples
Inspect Storage Replica featureGet-WindowsFeature Storage-Replica,FS-FileServerView examples
Inspect disks and volumesGet-Volume | Select-Object DriveLetter,FileSystem,AllocationUnitSize,Size,HealthStatusView examples
Run topology testTest-SRTopology @TopologyTestView examples
Open topology reportInvoke-Item 'C:\SRTest\TestSrTopologyReport.html'View examples
Create partnershipNew-SRPartnership @PartnershipView examples
Inspect replication groupsGet-SRGroup -ComputerName SR01View examples
Inspect partnershipsGet-SRPartnership -SourceComputerName SR01View examples
Read Storage Replica eventsGet-WinEvent -LogName ` 'Microsoft-Windows-StorageReplica/Admin' -MaxEvents ` 100View examples
Read performance countersGet-Counter '\Storage Replica Statistics(*)\Current RPO'View examples
Set asynchronous modeSet-SRPartnership -SourceComputerName SR01 -SourceRGName ` RG01 -ReplicationMode Asynchronous -WhatIfView examples
Constrain replication interfacesSet-SRNetworkConstraint @NetworkConstraint -WhatIfView examples
Resize replica logSet-SRGroup -ComputerName SR01 -Name RG01 ` -LogSizeInBytes 16GB -WhatIfView examples
Permit volume resizeSet-SRGroup -ComputerName SR01 -Name RG01 ` -AllowVolumeResize $true -WhatIfView examples
Reverse replication directionSet-SRPartnership -NewSourceComputerName SR02 ` -SourceRGName RG02 -DestinationComputerName SR01 ` -DestinationRGName RG01 -WhatIfView examples
Suspend a groupSuspend-SRGroup -ComputerName SR01 -Name RG01 -WhatIfView examples
Remove partnershipRemove-SRPartnership -SourceComputerName SR01 ` -SourceRGName RG01 -WhatIfView examples

Storage Replica performs block-level volume replication between Windows Servers or clusters for disaster recovery and stretch scenarios. It is not backup: deletions, corruption, and ransomware can replicate. Production success depends on supported editions and topology, dedicated data and log volumes, sector compatibility, low-latency high-throughput networking, AD and WinRM readiness, independent backups, and rehearsed failover. Destination data volumes are normally inaccessible while replication owns them.

Step by step

Detailed examples

01

Verify edition, topology, storage, network, and identity

Storage Replica supports server-to-server, cluster-to-cluster, stretch cluster, and server-to-self scenarios with version-specific edition limits. Windows Server 2019 Standard is limited to one partnership, one resource group, and a single volume up to 2 TB; verify current licensing for the exact release. Servers need AD forest membership, File Server and Storage Replica features, administrative rights, WinRM, compatible sector sizes, separate data and log volumes, GPT, and adequate memory and network. Data volumes must not contain page files or system content.

Collect a read-only readiness inventory
Get-ComputerInfo -Property WindowsProductName,WindowsVersion,OsBuildNumber
Get-WindowsFeature Storage-Replica, FS-FileServer
Get-Disk | Select-Object Number, PartitionStyle, LogicalSectorSize, PhysicalSectorSize, HealthStatus
Get-Volume | Select-Object DriveLetter, FileSystem, AllocationUnitSize, Size, SizeRemaining
Get-NetAdapter | Where-Object Status -eq Up | Select-Object ifIndex, Name, LinkSpeed
Back to quick reference ↑
02

Test with representative workload before creation

Test-SRTopology checks configuration and measures throughput, latency, IOPS, and log recommendations over a chosen duration. Run long enough to cover peak workload, maintenance, and backup traffic; a short quiet test can produce unsafe sizing. It creates a temporary 100 MB test file plus report data but does not establish replication. Review every warning in the HTML report. Synchronous mode generally needs very low average round-trip latency because application writes wait for both sites.

Run a non-partnership topology assessment
$TopologyTest = @{
    SourceComputerName='SR01'; SourceVolumeName='D:'; SourceLogVolumeName='L:'
    DestinationComputerName='SR02'; DestinationVolumeName='D:'; DestinationLogVolumeName='L:'
    DurationInMinutes=30; ResultPath='C:\SRTest'
}
# Generates test I/O and a report but no partnership:
# Test-SRTopology @TopologyTest
Get-ChildItem 'C:\SRTest' -ErrorAction SilentlyContinue
Back to quick reference ↑
03

Create replication only after backup and application quiescence

New-SRPartnership is a major mutation with no universal transaction. Source and destination data volumes must match requirements; the destination volume becomes inaccessible and its previous contents are not a safe backup. Confirm which server has authoritative data, stop or coordinate the application, take independent tested backups, verify topology report, then create during a change window. Initial block synchronization consumes substantial bandwidth and can affect latency. Feature installation or cluster changes may require restart.

Record exact identities and the proposed partnership
Get-Volume -CimSession SR01 -DriveLetter D | Select-Object UniqueId, Size, FileSystem
Get-Volume -CimSession SR02 -DriveLetter D | Select-Object UniqueId, Size, FileSystem
$Partnership = @{
    SourceComputerName='SR01'; SourceRGName='RG01'; SourceVolumeName='D:'; SourceLogVolumeName='L:'
    DestinationComputerName='SR02'; DestinationRGName='RG02'; DestinationVolumeName='D:'; DestinationLogVolumeName='L:'
}
# New-SRPartnership @Partnership executes only from the approved runbook.
Back to quick reference ↑
04

Monitor partnership state, events, backlog, and application health

A partnership existing is not proof of current protection. Monitor source role, replication mode, last in-sync time, log utilization, health state, destination reachability, event logs, network latency, and application performance. Async Current RPO can grow during congestion; synchronous mode can stall writes during remote or network trouble. Establish alert thresholds from observed workload rather than a single generic value. Protect event forwarding because a compromised source can hide local evidence.

Collect replication health from both nodes
Get-SRGroup -ComputerName SR01 | Format-List *
Get-SRGroup -ComputerName SR02 | Format-List *
Get-SRPartnership -SourceComputerName SR01 | Format-List *
Get-WinEvent -ComputerName SR01 -LogName 'Microsoft-Windows-StorageReplica/Admin' -MaxEvents 100 |
    Select-Object TimeCreated, Id, LevelDisplayName, Message
Back to quick reference ↑
05

Choose consistency and network paths explicitly

Synchronous replication provides zero data loss for committed writes under normal operation but adds remote latency and can affect availability. Asynchronous replication decouples acknowledgements and permits a nonzero recovery point. Changing mode changes the protection contract. Network constraints are an allowed list of interfaces and must be validated at both endpoints; misconfiguration can interrupt replication. Storage Replica uses SMB and Kerberos security capabilities, but network segmentation and least privilege remain necessary.

Review mode and preview a constrained path
Get-SRPartnership -SourceComputerName SR01 |
    Select-Object SourceRGName, DestinationComputerName, ReplicationMode
Get-NetIPConfiguration -CimSession SR01 | Select-Object InterfaceIndex, InterfaceAlias, IPv4Address
Get-NetIPConfiguration -CimSession SR02 | Select-Object InterfaceIndex, InterfaceAlias, IPv4Address
$NetworkConstraint = @{ SourceComputerName='SR01'; SourceRGName='RG01'; SourceNWInterface=10; DestinationComputerName='SR02'; DestinationRGName='RG02'; DestinationNWInterface=12 }
Set-SRNetworkConstraint @NetworkConstraint -WhatIf
Back to quick reference ↑
06

Size logs for churn, latency, and outage duration

Dedicated log volumes should use fast storage, a 64 KB allocation unit, and enough capacity for write rate and expected disconnection. Log size is not a retention history from which arbitrary old files can be restored. Resize workflows require free space and coordinated source/destination changes; shrinking or expanding replicated data volumes without documented steps can break replication. AllowVolumeResize is a temporary control, not permission to improvise. Keep independent application-consistent backups.

Inspect allocation and current log settings
Get-Volume -CimSession SR01 -DriveLetter L |
    Select-Object DriveLetter, FileSystem, AllocationUnitSize, Size, SizeRemaining
Get-SRGroup -ComputerName SR01 -Name RG01 |
    Select-Object Name, LogVolume, LogSizeInBytes, AllowVolumeResize
Get-SRGroup -ComputerName SR02 -Name RG02 |
    Select-Object Name, LogVolume, LogSizeInBytes, AllowVolumeResize
Back to quick reference ↑
07

Fail over the application, storage, and replication direction as one runbook

Storage Replica does not automatically move a standalone application, DNS name, IP address, service configuration, or clients in server-to-server topology. Planned direction reversal requires quiescing writes, confirming replication convergence, stopping the application at the source, changing direction, and starting the application only after validation. An unplanned disaster may lose async writes. Suspend-SRGroup dismounts the replicated volume and blocks application access until Sync-SRGroup resumes it; it is not a backup snapshot. Rehearse failback as carefully as failover.

Gate a planned reversal with health evidence
Get-SRGroup -ComputerName SR01 -Name RG01 |
    Select-Object IsPrimary, IsSuspended, ReplicationStatus, LastInSyncTime
Get-SRGroup -ComputerName SR02 -Name RG02 |
    Select-Object IsPrimary, IsSuspended, ReplicationStatus, LastInSyncTime
# Stop application writes and validate backups before Set-SRPartnership direction reversal.
Back to quick reference ↑
08

Remove only from the current source and retain recovery evidence

Microsoft specifically warns to run Remove-SRPartnership only on the current source, not the destination. Then remove groups using the documented order after confirming application placement and backup. Removal changes protection and may make destination storage accessible; validate data ownership before anyone writes to it. WhatIf helps resolve targets but does not predict all storage/application consequences. Restrict Storage Replica administration, protect computer accounts and WinRM, and audit partnership changes.

Identify the current source before removal
Get-SRGroup -ComputerName SR01 | Select-Object ComputerName, Name, IsPrimary, IsInPartnership
Get-SRGroup -ComputerName SR02 | Select-Object ComputerName, Name, IsPrimary, IsInPartnership
Get-SRPartnership -SourceComputerName SR01 | Format-List *
# Remove-SRPartnership only on the verified current source in the approved retirement plan.
Back to quick reference ↑

Sources and further reading

References

Authoritative documentation used to verify and expand this cheat sheet.

  1. Microsoft LearnStorage Replica overviewlearn.microsoft.com
  2. Microsoft LearnServer-to-server storage replicationlearn.microsoft.com
  3. Microsoft LearnStorageReplica modulelearn.microsoft.com
  4. Microsoft LearnTest-SRTopologylearn.microsoft.com
  5. Microsoft LearnNew-SRPartnershiplearn.microsoft.com
  6. Microsoft LearnRemove-SRPartnershiplearn.microsoft.com

Help us improve

Found a typo or missing example?

Tell us what would make this cheat sheet clearer, more complete, or more useful.

Share feedback