-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the SdnDiagnostics wiki!
SdnDiagnostics is a PowerShell module that is designed to simplify the diagnostic troubleshooting and data collection process related to Microsoft Software Defined Network.
- 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.
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.
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.
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.
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 ofClientSecurityGroup
fromGet-NetworkController
Example usage of the two credential can be found at Get-SdnInfrastructureInfo
- Clear-SdnWorkingDirectory
- Convert-SdnEtwTraceToTxt
- Copy-SdnFileFromComputer
- Copy-SdnFileToComputer
- Debug-SdnFabricInfrastructure
- Disable-SdnRasGatewayTracing
- Enable-SdnRasGatewayTracing
- Enable-SdnVipTrace
- Get-SdnApiEndpoint
- Get-SdnAuditLog
- Get-SdnCertificate
- Get-SdnConfigState
- Get-SdnDiagnosticLogFile
- Get-SdnEventLog
- Get-SdnFabricInfrastructureResult
- Get-SdnGateway
- Get-SdnInfrastructureInfo
- Get-SdnInternalLoadBalancer
- Get-SdnLoadBalancerMux
- Get-SdnModuleConfiguration
- Get-SdnMuxCertificate
- Get-SdnMuxDistributedRouterIP
- Get-SdnMuxState
- Get-SdnMuxStatefulVip
- Get-SdnMuxStatelessVip
- Get-SdnMuxStats
- Get-SdnMuxVip
- Get-SdnMuxVipConfig
- Get-SdnNetAdapterEncapOverheadConfig
- Get-SdnNetAdapterRdmaConfig
- Get-SdnNetworkController
- Get-SdnNetworkControllerClusterInfo
- Get-SdnNetworkControllerNode
- Get-SdnNetworkControllerNodeCertificate
- Get-SdnNetworkControllerRestCertificate
- Get-SdnNetworkControllerState
- Get-SdnNetworkInterfaceOutboundPublicIPAddress
- Get-SdnOvsdbAddressMapping
- Get-SdnOvsdbFirewallRule
- Get-SdnOvsdbGlobalTable
- Get-SdnOvsdbPhysicalPort
- Get-SdnOvsdbRouterTable
- Get-SdnOvsdbUcastMacRemoteTable
- Get-SdnProviderAddress
- Get-SdnPublicIPPoolUsageSummary
- Get-SdnResource
- Get-SdnServer
- Get-SdnServerCertificate
- Get-SdnServiceFabricApplicationHealth
- Get-SdnServiceFabricClusterConfig
- Get-SdnServiceFabricClusterHealth
- Get-SdnServiceFabricClusterManifest
- Get-SdnServiceFabricNode
- Get-SdnServiceFabricPartition
- Get-SdnServiceFabricReplica
- Get-SdnServiceFabricService
- Get-SdnSlbStateInformation
- Get-SdnVfpPortGroup
- Get-SdnVfpPortLayer
- Get-SdnVfpPortRule
- Get-SdnVfpPortState
- Get-SdnVfpVmSwitchPort
- Get-SdnVipConfig
- Get-SdnVMNetworkAdapter
- Get-SdnVMNetworkAdapterPortProfile
- Import-SdnCertificate
- Install-SdnDiagnostics
- Invoke-SdnCommand
- Invoke-SdnGetNetView
- Invoke-SdnResourceDump
- Invoke-SdnServiceFabricCommand
- Move-SdnServiceFabricReplica
- New-SdnCertificate
- New-SdnCertificateRotationConfig
- New-SdnExpressBGPHost
- New-SdnMuxCertificate
- New-SdnNetworkControllerNodeCertificate
- New-SdnNetworkControllerRestCertificate
- New-SdnServerCertificate
- Remove-SdnExpressBGPHost
- Repair-SdnDiagnosticsScheduledTask
- Set-SdnCertificateAcl
- Set-SdnNetworkController
- Set-SdnServiceFabricClusterConfig
- Set-SdnVMNetworkAdapterPortProfile
- Show-SdnVfpPortConfig
- Show-SdnVipState
- Start-SdnCertificateRotation
- Start-SdnDataCollection
- Start-SdnEtwTraceCapture
- Start-SdnMuxCertificateRotation
- Start-SdnNetshTrace
- Start-SdnServerCertificateRotation
- Stop-SdnEtwTraceCapture
- Stop-SdnNetshTrace
- Test-SdnCertificateRotationConfig
- Test-SdnExpressBGP
- Test-SdnProviderAddressConnectivity