Skip to content
Adam Rudell edited this page Jun 23, 2023 · 32 revisions

Welcome to the SdnDiagnostics wiki!

Description

SdnDiagnostics is a PowerShell module that is designed to simplify the diagnostic troubleshooting and data collection process related to Microsoft Software Defined Network.

Requirements

  1. PSRemoting must be enabled on the SDN fabric nodes that will be receiving commands. You can set this by running Enable-PSRemoting. For more details around PSRemoting, refer to https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-5.1.

Installation

SdnDiagnostics is published to the PowerShell Gallery as part of a GitHub Action when changes are pushed to main. To install the module on your system, use Install-Module -Name SdnDiagnostics.

  • Note: It's recommended to use the latest version of PackageManagement. Update-Module -Name PackageManagement

Once you have installed SdnDiagnostics module to your workstation, you can import the module and seed out the SdnDiagnostics module to the appropriate nodes within the SDN fabric to ensure all nodes are running the same version of SdnDiagnostics.

Import-Module -Name SdnDiagnostics -Force

$environmentDetails = Get-SdnInfrastructureInfo -NetworkController 'NC01'
Install-SdnDiagnostics -ComputerName $environmentDetails.FabricNodes

Alternatively, a NuGet package is published automatically to NuGet.

Installation in Disconnected environments

In certain situations, some or all the SDN fabric nodes may not have access to the internet. In these scenarios, you can install the module from any workstation that has internet connectivity, and then leverage Install-SdnDiagnostics -ComputerName 'NodeName' to get the module copied. Likewise, if your workstation already has access to the SDN fabric nodes, you can just run the SdnDiagnostics module from your workstation directly as it's designed to be lightweight module used for remote interaction of the SDN fabric. Only certain functions such as certificate rotation require you to run the module from Network Controller directly.

Updates

As mentioned previously, the module published on the PowerShell Gallery updates whenever a push is performed on the main branch, so the module will be updated frequently to push code fixes or add new functionality. To check the latest package that is published in PowerShell Gallery, use Find-Module -Name SdnDiagnostics and compare with the results returned for Get-Module -Name SdnDiagnostics. To update the module, run:

Update-Module -Name SdnDiagnostics
Import-Module -Name SdnDiagnostics -Force

You may need to perform Remove-Module -Name SdnDiagnostics and then Import-Module -Name SdnDiagnostics after updating as you may have multiple versions of the module loaded into the PowerShell runspace. Once you have updated the SdnDiagnostics module, use the steps in installation to seed out the module to the rest of the nodes in the SDN fabric.

Accounts to run PowerShell

By default, the PowerShell commands in this module will run as the current logon user. Some of the commands accept the -Credential or -NcRestCredential parameter to specify different account. There are two type of accounts used by SDN to authorize access. See NC Security for more information.

  • -Credential is used to specify account that have local admin privilege for the servers like NC, MUX, Gateway and SDN Host.
  • -NcRestCredential is used to specify account that have access NC REST API. It is member of ClientSecurityGroup from Get-NetworkController

Example usage of the two credential can be found at Get-SdnInfrastructureInfo

Documentation

How To Guides:

Troubleshooting Guides

Learning

Functions

Clone this wiki locally