az network watcher packet-capture

(PREVIEW) Manage packet capture sessions on VMs.

These commands require that both Azure Network Watcher is enabled for the VM's region and that AzureNetworkWatcherExtension is enabled on the VM.

Commands

az network watcher packet-capture create Create and start a packet capture session.
az network watcher packet-capture delete Deletes the specified packet capture session.
az network watcher packet-capture list Lists all packet capture sessions within the specified resource group.
az network watcher packet-capture show Gets a packet capture session by name.
az network watcher packet-capture show-status Query the status of a running packet capture session.
az network watcher packet-capture stop Stops a specified packet capture session.

az network watcher packet-capture create

Create and start a packet capture session.

az network watcher packet-capture create --name
--resource-group
--vm
[--capture-limit]
[--capture-size]
[--file-path]
[--filters]
[--storage-account]
[--storage-path]
[--time-limit]

Required Parameters

--name -n
Name of the packet capture session.
--resource-group -g
Name of the resource group the target VM is in. Do not use when supplying VM ID.
--vm
Name or ID of the VM to target.

Optional Parameters

--capture-limit
The maximum size in bytes of the capture output.
--capture-size
Number of bytes captured per packet. Excess bytes are truncated.
--file-path
Local path on the targeted VM at which to save the packet capture. For Linux VMs, the path must start with /var/captures.
--filters
JSON encoded list of packet filters. Use `@<file path>` to load from file.
--storage-account
Name or ID of a storage account to save the packet capture to.
--storage-path
Fully qualified URI of an existing storage container in which to store the capture file.
--time-limit
Maximum duration of the capture session in seconds.

az network watcher packet-capture delete

Deletes the specified packet capture session.

az network watcher packet-capture delete --location
--name

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--name -n
The name of the packet capture session.

az network watcher packet-capture list

Lists all packet capture sessions within the specified resource group.

az network watcher packet-capture list --location

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.

az network watcher packet-capture show

Gets a packet capture session by name.

az network watcher packet-capture show --location
--name

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--name -n
The name of the packet capture session.

az network watcher packet-capture show-status

Query the status of a running packet capture session.

az network watcher packet-capture show-status --location
--name

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--name -n
The name given to the packet capture session.

az network watcher packet-capture stop

Stops a specified packet capture session.

az network watcher packet-capture stop --location
--name

Required Parameters

--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--name -n
The name of the packet capture session.