Skip to content
Tech Shizz Logo

An Engineers Blog

  • TechShizz
  • blog

Configure a Storage Replica | Server 2016

Posted on February 23, 2021 By rich No Comments on Configure a Storage Replica | Server 2016

The below PowerShell commands can be used to configure a Storage Replica.

# install storage replica feature on replication partners
Invoke-Command -ComputerName FS1,FS2 -ScriptBlock { Install-WindowsFeature -Name Storage-Replica,FS-FileServer -IncludeManagementTools -Restart }
# test out a potential partnership
Test-SRTopology -SourceComputerName FS1 -SourceVolumeName R: -SourceLogVolumeName L: `
                -DestinationComputerName FS2 -DestinationVolumeName R: -DestinationLogVolumeName L: `
                -DurationInMinutes 1 -ResultPath c:logs -IgnorePerfTests
# create a storage replica partnership
New-SRPartnership -SourceComputerName FS1 -SourceRGName FS1RG -SourceVolumeName R: -SourceLogVolumeName L: `
                  -DestinationComputerName FS2 -DestinationRGName FS2RG -DestinationVolumeName R: -DestinationLogVolumeName L:
# view replication status
(Get-SRGroup).Replicas
Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica
# add some files to the source volume
"Hello!" > r:file.txt
"Was it me," > r:file2.txt
"you were looking for?" > r:file3.txt
fsutil file createnew r:file4.dat 1000000000
# reverse replication
Set-SRPartnership -NewSourceComputerName FS2 -SourceRGName FS2RG -DestinationComputerName FS1 -DestinationRGName FS1RG
# remove replication and clean up
Get-SRPartnership | Remove-SRPartnership
Invoke-Command -ComputerName FS1,FS2 -ScriptBlock {
    Get-SRGroup | Remove-SRGroup
}

Post navigation

❮ Previous Post: HTTP Error 503 when Single Sin On redirecting to ADFS Server After Re-Enabling Single Sign On
Next Post: Connecting to and Configuring Nano Servers ❯

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Subscribe to our newsletter!

Recent Posts

  • How to implement a lightning-fast ransomware playbook
  • How to achieve defence in depth in your business
  • How to implement a SecOps team phishing response plan
  • How to block an Office 365 Sign-in correctly
  • Microsoft finally patched serious Exchange 0-day over a month old!

Recent Comments

    Archives

    • November 2022
    • July 2021
    • March 2021
    • February 2021

    Categories

    • Cyber Security
    • Uncategorized

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Copyright © 2023 .

    Theme: Oceanly News Dark by ScriptsTown