-
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.
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 every so often to NuGet.
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 on 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
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
To help facilitate automated troubleshooting, there are several functions that do the bulk of the work.
-
Debug-SdnFabricInfrastructure
: Executes a series of validation tests to check the current state of the environment. To see full list of parameters supported with the function, review https://github.com/microsoft/SdnDiagnostics/wiki/Debug-SdnFabricInfrastructure.- Example:
-
Test-SdnKnownIssue
: Executes a series of checks to look for common issues. To see full list of parameters supported with the function, review https://github.com/microsoft/SdnDiagnostics/wiki/Test-SdnKnownIssue.- Example:
-
Start-SdnDataCollection
: Performs automated data collection by gathering the appropriate configuration details and logs for the role(s) or computers specified. To see a full list of the parameters supported with the function, review https://github.com/microsoft/SdnDiagnostics/wiki/Start-SdnDataCollection.- Example:
- 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