Skip to content

Commit

Permalink
Editorial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwheeler committed Jun 26, 2024
1 parent f100c7c commit 7a1039d
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 103 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
external help file: Microsoft.NetworkController.Powershell.dll-help.xml
Module Name: NetworkController
ms.date: 06/26/2024
online version: https://learn.microsoft.com/powershell/module/networkcontroller/get-networkcontrollermultisiteconfiguration?view=windowsserver2025-ps
schema: 2.0.0
---
Expand All @@ -15,8 +16,8 @@ Gets Multisite peering configuration parameters

```
Get-NetworkControllerMultisiteConfiguration [-ConnectionUri <Uri>]
[-CertificateThumbprint <String>] [-Credential <PSCredential>] [-PassInnerException]
[<CommonParameters>]
[-CertificateThumbprint <String>] [-Credential <PSCredential>] [-PassInnerException]
[<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -30,11 +31,10 @@ sanity check for the state of a deployment.
### Example 1: Check Peering State

```powershell
Get-NetworkControllerMultisiteConfiguration -ConnectionUri 'https://site1.com' | ConvertTo-JSON
-depth 100
Get-NetworkControllerMultisiteConfiguration -ConnectionUri 'https://site1.contoso.com' |
ConvertTo-Json -depth 100
```


## PARAMETERS

### -CertificateThumbprint
Expand All @@ -57,7 +57,7 @@ Accept wildcard characters: False
### -ConnectionUri
Specifies the Uniform Resource Identifier (URI) of a Network Controller.
Specifies the Uniform Resource Identifier (URI) of a Network Controller.
```yaml
Type: System.Uri
Expand All @@ -73,9 +73,9 @@ Accept wildcard characters: False
### -Credential
Specifies a user credential that has permission to perform this action. The
default is the current user. Specify this parameter only if you run this cmdlet
on a computer that is not part of the network controller cluster.
Specifies a user credential that has permission to perform this action. The default is the current
user. Specify this parameter only if you run this cmdlet on a computer that is not part of the
network controller cluster.
```yaml
Type: System.Management.Automation.PSCredential
Expand All @@ -91,12 +91,11 @@ Accept wildcard characters: False
### -PassInnerException
This thumbprint must also be provided in the **ClientCertificateThumbprint**
parameter in the `Install-NetworkController` or `Set-NetworkController` cmdlet so
that Network Controller can authorize this user. The thumbprint must be provided
only if the network controller client authentication is X509 certificates.
`Get-NetworkController` retrieves that client authentication and authorization
information.
This thumbprint must also be provided in the **ClientCertificateThumbprint** parameter in the
`Install-NetworkController` or `Set-NetworkController` cmdlet so that Network Controller can
authorize this user. The thumbprint must be provided only if the network controller client
authentication is X509 certificates. `Get-NetworkController` retrieves that client authentication
and authorization information.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand All @@ -112,10 +111,9 @@ Accept wildcard characters: False

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction,
-ErrorVariable, -InformationAction, -InformationVariable, -OutVariable,
-OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS
Expand All @@ -126,8 +124,6 @@ For more information, see

### System.Object

### System.Object

## NOTES

## RELATED LINKS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
external help file: Microsoft.NetworkController.Powershell.dll-help.xml
Module Name: NetworkController
ms.date: 06/26/2024
online version: https://learn.microsoft.com/powershell/module/networkcontroller/set-networkcontrollermultisiteconfiguration?view=windowsserver2025-ps
schema: 2.0.0
---
Expand All @@ -14,100 +15,107 @@ Initiates site peering between NC infrastructures across two different locations
## SYNTAX

```
Set-NetworkControllerMultisiteConfiguration [[-Tags] <PSObject>] [-Properties]
<NetworkControllerMultisiteProperties> [[-Etag] <String>] [[-ResourceMetadata]
<ResourceMetadata>] [[-ResourceId] <String>] [-Force] -ConnectionUri <Uri>
[-CertificateThumbprint <String>] [-Credential <PSCredential>] [-PassInnerException] [-WhatIf]
[-Confirm] [<CommonParameters>]
Set-NetworkControllerMultisiteConfiguration [[-Tags] <PSObject>]
[-Properties] <NetworkControllerMultisiteProperties> [[-Etag] <String>]
[[-ResourceMetadata] <ResourceMetadata>] [[-ResourceId] <String>] [-Force] -ConnectionUri <Uri>
[-CertificateThumbprint <String>] [-Credential <PSCredential>] [-PassInnerException] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

## DESCRIPTION

The `Set-NetworkControllerMultisiteConfiguration` cmdlet initiates a Multisite peering connection
between two NC infrastructures. For instance, if you have site A with NC infrastructure A and
site B with NC infrastructure B, then you can initiate a peer between NC infrastructure A and NC
infrastructure B. This cmdlet can not only initiate peering but can also remove peering and
change the status of a NC infrastructure to primary. Additionally, this cmdlet can also be used
to edit site properties once configured.
between two NC infrastructures. For instance, if you have site A with NC infrastructure A and site B
with NC infrastructure B, then you can initiate a peer between NC infrastructure A and NC
infrastructure B. This cmdlet can not only initiate peering but can also remove peering and change
the status of a NC infrastructure to primary. Additionally, this cmdlet can also be used to edit
site properties once configured.

## EXAMPLES

### Example 1: Initiate Peering with Self-Signed Certificates

```powershell
$cert1 = Get-ChildItem 'Cert:\LocalMachine\My' | where {$_.Subject -like ‘sdnsite1.contoso.com’}
$cert1 = Get-ChildItem 'Cert:\LocalMachine\My' | Where-Object Subject -like 'sdnsite1.contoso.com'
$cert2 = Get-ChildItem 'Cert:\LocalMachine\My' | Where-Object Subject -like 'sdnsite2.contoso.com'
$base64cert1 = [System.Convert]::ToBase64String($cert1.RawData)
$cert2 = Get-ChildItem “Cert:\LocalMachine\My” | where {$_.Subject -like ‘sdnsite2.contoso.com’}
$base64cert2 = [System.Convert]::ToBase64String($cert2.RawData)
$prop = new-object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
$prop = New-Object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
$prop.certificateSubjectName = 'sdnsite1.contoso.com'
$prop.Sites = new-object Microsoft.Windows.NetworkController.NetworkControllerSite
$prop.Sites = New-Object Microsoft.Windows.NetworkController.NetworkControllerSite
$prop.Sites[0].ResourceId = 'site2'
$prop.Sites[0].Properties = new-object
Microsoft.Windows.NetworkController.NetworkControllerSiteProperties
$prop.Sites[0].Properties = New-Object Microsoft.Windows.NetworkController.NetworkControllerSiteProperties
$prop.Sites[0].Properties.RestIPAddress = 'sdnsite2.contoso.com'
$prop.Sites[0].Properties.CertificateSubjectName = 'sdnsite2.contoso.com'
$prop.Sites[0].Properties.EncodedCertificate = $base64cert2
Set-NetworkControllerMultisiteConfiguration -ConnectionUri 'https://sdnsite1.contoso.com'
-Properties $prop -Force
$parameters = @{
ConnectionUri = 'https://sdnsite1.contoso.com'
Properties = $prop
Force = $true
}
Set-NetworkControllerMultisiteConfiguration @parameters
$prop = new-object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
$prop = New-Object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
$prop.certificateSubjectName = 'sdnsite2.contoso.com'
$prop.Sites = new-object Microsoft.Windows.NetworkController.NetworkControllerSite
$prop.Sites = New-Object Microsoft.Windows.NetworkController.NetworkControllerSite
$prop.Sites[0].ResourceId = 'site1'
$prop.Sites[0].Properties = new-object
Microsoft.Windows.NetworkController.NetworkControllerSiteProperties
$prop.Sites[0].Properties = New-Object Microsoft.Windows.NetworkController.NetworkControllerSiteProperties
$prop.Sites[0].Properties.RestIPAddress = 'sdnsite1.contoso.com'
$prop.Sites[0].Properties.CertificateSubjectName = 'sdnsite1.contoso.com'
$prop.Sites[0].Properties.EncodedCertificate = $base64cert1
Set-NetworkControllerMultisiteConfiguration -ConnectionUri 'https://sdnsite2.contoso.com'
-Properties $prop -Force
$parameters.ConnectionUri = 'https://sdnsite2.contoso.com'
Set-NetworkControllerMultisiteConfiguration @parameters
```

### Example 2: Removing Peering after Multisite has been set-up

```powershell
$prop = new-object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
Set-NetworkControllerMultisiteConfiguration -ConnectionUri 'https://site1.com' -Properties $prop
-Force
Set-NetworkControllerMultisiteConfiguration -ConnectionUri 'https://site2.com' -Properties $prop
-Force
$prop = New-Object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
$parameters = @{
ConnectionUri = 'https://site1.contoso.com'
Properties = $prop
Force = $true
}
Set-NetworkControllerMultisiteConfiguration @parameters
$parameters.ConnectionUri = 'https://site2.contoso.com'
Set-NetworkControllerMultisiteConfiguration @parameters
```

### Example 3: Removing a site where site property is an empty array or has a null value

```powershell
$multisiteProp = new-object
Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
Set-NetworkControllerMultisiteConfiguration -ConnectionUri $site2Url -Properties $multisiteProp
-Force
Set-NetworkControllerMultisiteConfiguration -ConnectionUri $site1Url -Properties $multisiteProp
-Force
$multisiteProp = New-Object Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
$parameters = @{
ConnectionUri = 'https://site2.contoso.com'
Properties = $multisiteProp
Force = $true
}
Set-NetworkControllerMultisiteConfiguration @parameters
$parameters.ConnectionUri = 'https://site1.contoso.com'
Set-NetworkControllerMultisiteConfiguration @parameters
```

### Example 4: **NetworkControllerMultisiteProperties** object properties

- CertificateSubjectName
- [[Sites] \<NetworkControllerSite\>]
- ResourceID/RESTIPAddress
- IsPrimary
- State
- DeploymentID
- APIVersion
- ConfigurationState
- [[Properties] \<NetworkControllerSiteProperties\>]
- RestIPAddress
- CertificateSubjectName
- EncodedCertificate
- ResourceID/RESTIPAddress
- IsPrimary
- State
- DeploymentID
- APIVersion
- ConfigurationState
- [[Properties] \<NetworkControllerSiteProperties\>]
- RestIPAddress
- CertificateSubjectName
- EncodedCertificate

## PARAMETERS

Expand Down Expand Up @@ -220,9 +228,8 @@ Accept wildcard characters: False

### -Properties

Specifies a site configuration for Multisite Peering. Site configuration comes as a
NetworkControllerMultisiteProperties object. This object can be defined as new-object
**Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties**.
Specifies a site configuration for Multisite Peering. This parameter takes a
**NetworkControllerMultisiteProperties** object, which you can create using `New-Object`.

```yaml
Type: Microsoft.Windows.NetworkController.NetworkControllerMultisiteProperties
Expand Down Expand Up @@ -302,8 +309,7 @@ Accept wildcard characters: False

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if the cmdlet runs. The cmdlet is not run.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,44 @@ Sets the primary site of a NetworkController Site.
## SYNTAX

```
Set-NetworkControllerMultisitePrimary [[-Tags] <PSObject>] [-Properties]
<NetworkControllerMultisitePrimaryProperties> [[-Etag] <String>] [[-ResourceMetadata]
<ResourceMetadata>] [[-ResourceId] <String>] [-Force] -ConnectionUri <Uri>
[-CertificateThumbprint <String>] [-Credential <PSCredential>] [-PassInnerException] [-WhatIf]
[-Confirm] [<CommonParameters>]
Set-NetworkControllerMultisitePrimary [[-Tags] <PSObject>]
[-Properties] <NetworkControllerMultisitePrimaryProperties> [[-Etag] <String>]
[[-ResourceMetadata] <ResourceMetadata>] [[-ResourceId] <String>] [-Force] -ConnectionUri <Uri>
[-CertificateThumbprint <String>] [-Credential <PSCredential>] [-PassInnerException] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

## DESCRIPTION

The `Set-NetworkControllerMultisitePrimary` cmdlet is used to change the primary site of a
location in a Multisite configuration. This can be done in the off-chance that your original
Primary site has gone offline and policies still need to be pushed and applied. Note, any
policies that were being configured at the moment when the original primary site crashes will be
lost and must be redone.
The `Set-NetworkControllerMultisitePrimary` cmdlet is used to change the primary site of a location
in a Multisite configuration. You can use this command in cases when your original Primary site has
gone offline and policies still need to be pushed and applied.

> [!NOTE]
> Any policies that were being configured when the original primary site crashed are lost and must
> be reapplied.
## EXAMPLES

### Example 1: Set new Primary site
### Example 1: Set new Primary site

```powershell
$prop = new-object
Microsoft.Windows.NetworkController.NetworkControllerMultisitePrimaryProperties
Set-NetworkControllerMultisitePrimary -ConnectionUri 'https://site1.com' -Properties $prop
-Force
$prop = New-Object Microsoft.Windows.NetworkController.NetworkControllerMultisitePrimaryProperties
$parameters = @{
ConnectionUri = 'https://site1.contoso.com'
Properties = $prop
Force = $true
}
Set-NetworkControllerMultisitePrimary @parameters
```

## PARAMETERS

### -CertificateThumbprint

Specifies the digital public key X.509 certificate of a user account that has permission to
perform this action. Specify this parameter only if you run this cmdlet on a computer that is
not part of the network controller cluster.
Specifies the digital public key X.509 certificate of a user account that has permission to perform
this action. Specify this parameter only if you run this cmdlet on a computer that is not part of
the network controller cluster.

```yaml
Type: System.String
Expand All @@ -63,7 +67,7 @@ Accept wildcard characters: False
### -ConnectionUri
Specifies the Uniform Resource Identifier (URI) of a Network Controller.
Specifies the Uniform Resource Identifier (URI) of a Network Controller.
```yaml
Type: System.Uri
Expand All @@ -79,9 +83,9 @@ Accept wildcard characters: False
### -Credential
Specifies a user credential that has permission to perform this action. The default is the
current user. Specify this parameter only if you run this cmdlet on a computer that is not part
of the network controller cluster.
Specifies a user credential that has permission to perform this action. The default is the current
user. Specify this parameter only if you run this cmdlet on a computer that is not part of the
network controller cluster.
```yaml
Type: System.Management.Automation.PSCredential
Expand All @@ -97,10 +101,10 @@ Accept wildcard characters: False
### -Etag
Specifies the entity tag (ETag) parameter of the resource. An ETag (entity tag) is an HTTP
response header returned by an HTTP-compliant web server used to determine change in the content
of a resource at a given URL. The value of the header is an opaque string representing the state
of the resource at the time the response was generated.
Specifies the entity tag (ETag) parameter of the resource. An ETag (entity tag) is an HTTP response
header returned by an HTTP-compliant web server used to determine change in the content of a
resource at a given URL. The value of the header is an opaque string representing the state of the
resource at the time the response was generated.
```yaml
Type: System.String
Expand Down Expand Up @@ -268,4 +272,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[Set-NetworkControllerMultisiteConfiguration](./Set-NetworkControllerMultisiteConfiguration.md)

[Get-NetworkControllerMultisiteConfiguration](./Get-NetworkControllerMultisiteConfiguration.md)

0 comments on commit 7a1039d

Please sign in to comment.