Skip to content

Commit 2091104

Browse files
committed
Add powershell syntax highlighting to code blocks
1 parent fa4abd2 commit 2091104

File tree

3 files changed

+26
-94
lines changed

3 files changed

+26
-94
lines changed

docset/winserver2016-ps/storagereplica/Set-SRNetworkConstraint.md

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,43 +30,21 @@ Any networks not specified by this cmdlet are no longer used by Storage Replica.
3030
## EXAMPLES
3131

3232
### Example 1: Set a constraint for stand-alone computers
33-
```
34-
This command lists available interface indexes by using the **Get-NetIPConfiguration** cmdlet. Run this command on both servers.
35-
36-
PS C:\>Get-NetIPConfiguration
37-
InterfaceAlias : Ethernet
38-
InterfaceIndex : 2
39-
InterfaceDescription : Microsoft Hyper-V Network Adapter
40-
NetProfile.Name : Threshold.nttest.microsoft.com
41-
IPv6Address : 2001:4898:f0:10d1:4037:4c52:6fa4:fe7f
42-
IPv4Address : 172.24.19.182
43-
IPv6DefaultGateway : fe80::ea65:49ff:fecd:4141
44-
IPv4DefaultGateway : 172.24.18.1
45-
DNSServer : 10.177.9.210
46-
10.177.9.211
47-
48-
InterfaceAlias : Ethernet 2
49-
InterfaceIndex : 3
50-
InterfaceDescription : Microsoft Hyper-V Network Adapter #2
51-
NetProfile.Name : Threshold.nttest.microsoft.com
52-
IPv6Address : 2001:4898:f0:10d1:20d9:301e:9af9:8b4e
53-
IPv4Address : 172.24.18.180
54-
IPv6DefaultGateway : fe80::ea65:49ff:fecd:4141
55-
IPv4DefaultGateway : 172.24.18.1
56-
DNSServer : 10.177.9.210
57-
10.177.9.211
58-
59-
The next command sets the network constraint for interfaces and replication groups. The final command makes sure that the constraint takes effect immediately by using the Update-SmbMultichannelConnection cmdlet.
60-
61-
PS C:\>Set-SRNetworkConstraint -SourceComputerName "SR-SRV06" -SourceRGName "ReplicationGroup02" -SourceNWInterface 6 -DestinationComputerName "SR-SRV05" -DestinationRGName "ReplicationGroup01" -DestinationNWInterface 2
62-
C:\PS> Update-SmbMultichannelConnection
33+
34+
The first command sets the network constraint for interfaces and replication groups. The final command makes sure that the constraint takes effect immediately by using the Update-SmbMultichannelConnection cmdlet.
35+
36+
```powershell
37+
Set-SRNetworkConstraint -SourceComputerName "SR-SRV06" -SourceRGName "ReplicationGroup02" -SourceNWInterface 6 -DestinationComputerName "SR-SRV05" -DestinationRGName "ReplicationGroup01" -DestinationNWInterface 2
38+
39+
Update-SmbMultichannelConnection
6340
```
6441

6542
This example sets the network constraint for interfaces and replication groups on stand-alone computers.
6643

6744
### Example 2: Set a constraint for a stretch cluster
68-
```
69-
PS C:\>Set-SRNetworkConstraint -SourceComputerName "SR-SRV01" -SourceRGName "Group01" -SourceNWInterface "Cluster Network 1","Cluster Network 2" -DestinationComputerName "SR-SRV03" -DestinationRGName "Group02" -DestinationNWInterface "Cluster Network 1","Cluster Network 2"
45+
46+
```powershell
47+
Set-SRNetworkConstraint -SourceComputerName "SR-SRV01" -SourceRGName "Group01" -SourceNWInterface "Cluster Network 1","Cluster Network 2" -DestinationComputerName "SR-SRV03" -DestinationRGName "Group02" -DestinationNWInterface "Cluster Network 1","Cluster Network 2"
7048
```
7149

7250
This command sets a network constraint for a specific set of cluster networks in a stretch cluster.

docset/winserver2019-ps/storagereplica/Set-SRNetworkConstraint.md

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,21 @@ Any networks not specified by this cmdlet are no longer used by Storage Replica.
3030
## EXAMPLES
3131

3232
### Example 1: Set a constraint for stand-alone computers
33-
```
34-
This command lists available interface indexes by using the **Get-NetIPConfiguration** cmdlet. Run this command on both servers.
35-
36-
PS C:\>Get-NetIPConfiguration
37-
InterfaceAlias : Ethernet
38-
InterfaceIndex : 2
39-
InterfaceDescription : Microsoft Hyper-V Network Adapter
40-
NetProfile.Name : Threshold.nttest.microsoft.com
41-
IPv6Address : 2001:4898:f0:10d1:4037:4c52:6fa4:fe7f
42-
IPv4Address : 172.24.19.182
43-
IPv6DefaultGateway : fe80::ea65:49ff:fecd:4141
44-
IPv4DefaultGateway : 172.24.18.1
45-
DNSServer : 10.177.9.210
46-
10.177.9.211
47-
48-
InterfaceAlias : Ethernet 2
49-
InterfaceIndex : 3
50-
InterfaceDescription : Microsoft Hyper-V Network Adapter #2
51-
NetProfile.Name : Threshold.nttest.microsoft.com
52-
IPv6Address : 2001:4898:f0:10d1:20d9:301e:9af9:8b4e
53-
IPv4Address : 172.24.18.180
54-
IPv6DefaultGateway : fe80::ea65:49ff:fecd:4141
55-
IPv4DefaultGateway : 172.24.18.1
56-
DNSServer : 10.177.9.210
57-
10.177.9.211
58-
59-
The next command sets the network constraint for interfaces and replication groups. The final command makes sure that the constraint takes effect immediately by using the **Update-SmbMultichannelConnection** cmdlet.
6033

34+
The first command sets the network constraint for interfaces and replication groups. The final command makes sure that the constraint takes effect immediately by using the **Update-SmbMultichannelConnection** cmdlet.
35+
36+
```powershell
6137
PS C:\>Set-SRNetworkConstraint -SourceComputerName "SR-SRV06" -SourceRGName "ReplicationGroup02" -SourceNWInterface 6 -DestinationComputerName "SR-SRV05" -DestinationRGName "ReplicationGroup01" -DestinationNWInterface 2
62-
C:\PS> Update-SmbMultichannelConnection
38+
39+
Update-SmbMultichannelConnection
6340
```
6441

6542
This example sets the network constraint for interfaces and replication groups on stand-alone computers.
6643

6744
### Example 2: Set a constraint for a stretch cluster
6845

69-
```
70-
PS C:\>Set-SRNetworkConstraint -SourceComputerName "SR-SRV01" -SourceRGName "Group01" -SourceNWInterface "Cluster Network 1","Cluster Network 2" -DestinationComputerName "SR-SRV03" -DestinationRGName "Group02" -DestinationNWInterface "Cluster Network 1","Cluster Network 2"
46+
```powershell
47+
Set-SRNetworkConstraint -SourceComputerName "SR-SRV01" -SourceRGName "Group01" -SourceNWInterface "Cluster Network 1","Cluster Network 2" -DestinationComputerName "SR-SRV03" -DestinationRGName "Group02" -DestinationNWInterface "Cluster Network 1","Cluster Network 2"
7148
```
7249

7350
This command sets a network constraint for a specific set of cluster networks in a stretch cluster.

docset/winserver2022-ps/storagereplica/Set-SRNetworkConstraint.md

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,21 @@ Any networks not specified by this cmdlet are no longer used by Storage Replica.
3030
## EXAMPLES
3131

3232
### Example 1: Set a constraint for stand-alone computers
33-
```
34-
This command lists available interface indexes by using the **Get-NetIPConfiguration** cmdlet. Run this command on both servers.
35-
36-
PS C:\>Get-NetIPConfiguration
37-
InterfaceAlias : Ethernet
38-
InterfaceIndex : 2
39-
InterfaceDescription : Microsoft Hyper-V Network Adapter
40-
NetProfile.Name : Threshold.nttest.microsoft.com
41-
IPv6Address : 2001:4898:f0:10d1:4037:4c52:6fa4:fe7f
42-
IPv4Address : 172.24.19.182
43-
IPv6DefaultGateway : fe80::ea65:49ff:fecd:4141
44-
IPv4DefaultGateway : 172.24.18.1
45-
DNSServer : 10.177.9.210
46-
10.177.9.211
47-
48-
InterfaceAlias : Ethernet 2
49-
InterfaceIndex : 3
50-
InterfaceDescription : Microsoft Hyper-V Network Adapter #2
51-
NetProfile.Name : Threshold.nttest.microsoft.com
52-
IPv6Address : 2001:4898:f0:10d1:20d9:301e:9af9:8b4e
53-
IPv4Address : 172.24.18.180
54-
IPv6DefaultGateway : fe80::ea65:49ff:fecd:4141
55-
IPv4DefaultGateway : 172.24.18.1
56-
DNSServer : 10.177.9.210
57-
10.177.9.211
58-
59-
The next command sets the network constraint for interfaces and replication groups. The final command makes sure that the constraint takes effect immediately by using the Update-SmbMultichannelConnection cmdlet.
60-
61-
PS C:\>Set-SRNetworkConstraint -SourceComputerName "SR-SRV06" -SourceRGName "ReplicationGroup02" -SourceNWInterface 6 -DestinationComputerName "SR-SRV05" -DestinationRGName "ReplicationGroup01" -DestinationNWInterface 2
62-
C:\PS> Update-SmbMultichannelConnection
33+
34+
The first command sets the network constraint for interfaces and replication groups. The final command makes sure that the constraint takes effect immediately by using the Update-SmbMultichannelConnection cmdlet.
35+
36+
```powershell
37+
Set-SRNetworkConstraint -SourceComputerName "SR-SRV06" -SourceRGName "ReplicationGroup02" -SourceNWInterface 6 -DestinationComputerName "SR-SRV05" -DestinationRGName "ReplicationGroup01" -DestinationNWInterface 2
38+
39+
Update-SmbMultichannelConnection
6340
```
6441

6542
This example sets the network constraint for interfaces and replication groups on stand-alone computers.
6643

6744
### Example 2: Set a constraint for a stretch cluster
6845

69-
```
70-
PS C:\>Set-SRNetworkConstraint -SourceComputerName "SR-SRV01" -SourceRGName "Group01" -SourceNWInterface "Cluster Network 1","Cluster Network 2" -DestinationComputerName "SR-SRV03" -DestinationRGName "Group02" -DestinationNWInterface "Cluster Network 1","Cluster Network 2"
46+
```powershell
47+
Set-SRNetworkConstraint -SourceComputerName "SR-SRV01" -SourceRGName "Group01" -SourceNWInterface "Cluster Network 1","Cluster Network 2" -DestinationComputerName "SR-SRV03" -DestinationRGName "Group02" -DestinationNWInterface "Cluster Network 1","Cluster Network 2"
7148
```
7249

7350
This command sets a network constraint for a specific set of cluster networks in a stretch cluster.

0 commit comments

Comments
 (0)