The New-AzPacketCaptureFilterConfig cmdlet creates a new packet capture filter object.
This object is used to restrict the type of packets that are captured during a packet capture session using the specified criteria.
The New-AzNetworkWatcherPacketCapture cmdlet can accept multiple filter objects to enable composable capture sessions.
Examples
Example 1: Create a Packet Capture with multiple filters
In this example we create a packet capture named "PacketCaptureTest" with multiple filters and a time limit. Once the session is complete, it will be saved to the specified storage account.
Note: The Azure Network Watcher extension must be installed on the target virtual machine to create packet captures.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Specifies the Local IP Address to filter on.
Example inputs:
"127.0.0.1" for single address entry.
"127.0.0.1-127.0.0.255" for range.
"127.0.0.1;127.0.0.5;" for multiple entries.
Specifies the Local IP Address to filter on.
Example inputs:
"127.0.0.1" for single address entry.
"127.0.0.1-127.0.0.255" for range.
"127.0.0.1;127.0.0.5;" for multiple entries.
Specifies the remote IP address to filter on.
Example inputs:
"127.0.0.1" for single address entry.
"127.0.0.1-127.0.0.255" for range.
"127.0.0.1;127.0.0.5;" for multiple entries.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.