Edit

Share via


New-AzPacketCaptureSettingsConfig

Creates a new capture setting object.

Syntax

Default (Default)

New-AzPacketCaptureSettingsConfig
    [-FileCount <Int32>]
    [-FileSizeInBytes <Int64>]
    [-SessionTimeLimitInSeconds <Int32>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The New-AzPacketCaptureSettingsConfig cmdlet creates a new packet capture settings object. This object is being used as a parameter for creating a packet capture, in case, we want to utilize the continuous capture capabilities and pass 'Continuous Capture' as true/false.

This New-AzPacketCaptureSettingsConfig cmdlet creates an object of PSPacketCaptureSettings, which contains file count, file size in bytes and session time limit (in second) with default values.

Examples

Example 1

New-AzPacketCaptureSettingsConfig -FileCount 2 -FileSizeInBytes 102400 -SessionTimeLimitInSeconds 60

In the above example, passing file count with file size and session time (in seconds). It will create an object.

Example 2

New-AzPacketCaptureSettingsConfig

In the above example, without passing any parameters. It will create an object with default values,

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FileCount

Number of file count. Default value is 1.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:1
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-FileSizeInBytes

Number of bytes captured per packet. Default value is 1073741824.

Parameter properties

Type:

Nullable<T>[Int64]

Default value:1073741824
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SessionTimeLimitInSeconds

Capture session in seconds. Default value is 18000.

Parameter properties

Type:

Nullable<T>[Int32]

Default value:18000
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Nullable<T>

Nullable<T>

Outputs

PSPacketCaptureSettings