Skip to content

Start SdnDataCollection

Adam Rudell edited this page Jul 15, 2024 · 7 revisions

Start-SdnDataCollection

SYNOPSIS

Automated data collection script to pull the current configuration state in conjuction with diagnostic logs and other data points used for debugging.

SYNTAX

Role (Default)

Start-SdnDataCollection [-NetworkController <String>] [-NcUri <Uri>] -Role <String[]>
 [-OutputDirectory <FileInfo>] [-IncludeNetView] [-IncludeLogs] [-FromDate <DateTime>] [-ToDate <DateTime>]
 [-Credential <PSCredential>] [-NcRestCredential <PSCredential>] [-Limit <Int32>] [-ConvertETW <Boolean>]
 [<CommonParameters>]

Computer

Start-SdnDataCollection [-NetworkController <String>] [-NcUri <Uri>] -ComputerName <String[]>
 [-OutputDirectory <FileInfo>] [-IncludeNetView] [-IncludeLogs] [-FromDate <DateTime>] [-ToDate <DateTime>]
 [-Credential <PSCredential>] [-NcRestCredential <PSCredential>] [-ConvertETW <Boolean>] [<CommonParameters>]

DESCRIPTION

{{ Fill in the Description }}

EXAMPLES

EXAMPLE 1

Start-SdnDataCollection -NetworkController 'Contoso-NC01' -Role Gateway,NetworkController,Server,LoadBalancerMux

EXAMPLE 2

Start-SdnDataCollection -NetworkController 'Contoso-NC01' -Role Gateway,NetworkController,Server,LoadBalancerMux -IncludeLogs

EXAMPLE 3

Start-SdnDataCollection -NetworkController 'Contoso-NC01' -Role Gateway,Server,LoadBalancerMux -IncludeLogs -FromDate (Get-Date).AddHours(-1) -Credential (Get-Credential)

EXAMPLE 4

Start-SdnDataCollection -NetworkController 'Contoso-NC01' -Role LoadBalancerMux -IncludeLogs -IncludeNetView -FromDate '2023-08-11 10:00:00 AM' -ToDate '2023-08-11 11:30:00 AM'

PARAMETERS

-NetworkController

Specifies the name or IP address of the network controller node on which this cmdlet operates. The parameter is optional if running on network controller node.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: $env:COMPUTERNAME
Accept pipeline input: False
Accept wildcard characters: False

-NcUri

Specifies the Uniform Resource Identifier (URI) of the network controller that all Representational State Transfer (REST) clients use to connect to that controller.

Type: Uri
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Role

The specific SDN role(s) to collect configuration state and logs from.

Type: String[]
Parameter Sets: Role
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ComputerName

Type the NetBIOS name, an IP address, or a fully qualified domain name of one or more remote computers.

Type: String[]
Parameter Sets: Computer
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputDirectory

Directory the results will be saved to. If ommitted, will default to the current working directory.

Type: FileInfo
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-WorkingDirectory)
Accept pipeline input: False
Accept wildcard characters: False

-IncludeNetView

If enabled, will execute Get-NetView on the Role(s) or ComputerName(s) defined.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-IncludeLogs

If enabled, will collect the diagnostic logs from the Role(s) or ComputerName(s) defined. Works in conjunction with the FromDate parameter.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-FromDate

Determines the start time of what logs to collect. If omitted, defaults to the last 4 hours.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-Date).AddHours(-4)
Accept pipeline input: False
Accept wildcard characters: False

-ToDate

Determines the end time of what logs to collect. Optional parameter that if ommitted, defaults to current time.

Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-Date)
Accept pipeline input: False
Accept wildcard characters: False

-Credential

Specifies a user account that has permission to perform this action. The default is the current user.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False

-NcRestCredential

Specifies a user account that has permission to access the northbound NC API interface. The default is the current user.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False

-Limit

Used in conjuction with the Role parameter to limit how many nodes per role operations are performed against. If ommitted, defaults to 16.

Type: Int32
Parameter Sets: Role
Aliases:

Required: False
Position: Named
Default value: 16
Accept pipeline input: False
Accept wildcard characters: False

-ConvertETW

Optional parameter that allows you to specify if .etl trace should be converted. By default, set to $true

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: True
Accept pipeline input: False
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 about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Documentation

How To Guides:

Troubleshooting Guides

Learning

Functions

Clone this wiki locally