共用方式為


az network watcher troubleshooting

管理網路監看員疑難解答會話。

如需設定疑難解答的詳細資訊,請造訪 https://learn.microsoft.com/azure/network-watcher/network-watcher-troubleshoot-manage-cli

命令

名稱 Description 類型 狀態
az network watcher troubleshooting show

取得上次疑難解答作業的結果。

核心 加語
az network watcher troubleshooting start

針對 VPN 連線或網關聯機的問題進行疑難解答。

核心 加語

az network watcher troubleshooting show

取得上次疑難解答作業的結果。

az network watcher troubleshooting show --resource
                                        [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                        [--resource-group]
                                        [--resource-type {vnetGateway, vpnConnection}]
                                        [--watcher-rg]

範例

顯示 Vnet 閘道疑難解答作業的結果或狀態。

az network watcher troubleshooting show -g MyResourceGroup --resource MyVnetGateway --resource-type vnetGateway

必要參數

--resource

要疑難解答的資源名稱或標識碼。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--resource-type -t

資源類型。

接受的值: vnetGateway, vpnConnection
--watcher-rg

監看員所屬的資源群組名稱。

全域參數
--debug

增加記錄詳細信息以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。

az network watcher troubleshooting start

針對 VPN 連線或網關聯機的問題進行疑難解答。

az network watcher troubleshooting start --resource
                                         --storage-account
                                         --storage-path
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--resource-group]
                                         [--resource-type {vnetGateway, vpnConnection}]
                                         [--watcher-rg]

範例

在 VPN 連線上啟動疑難解答作業。

az network watcher troubleshooting start -g MyResourceGroup --resource MyVPNConnection --resource-type vpnConnection --storage-account MyStorageAccount --storage-path https://{storageAccountName}.blob.core.windows.net/{containerName}

必要參數

--resource

要疑難解答的資源名稱或標識碼。

--storage-account

用來儲存疑難解答結果的記憶體帳戶名稱或標識符。

--storage-path

用來儲存疑難解答結果之記憶體 Blob 容器的完整 URI。

選擇性參數

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--resource-type -t

如果未指定資源標識碼,則為要疑難解答的目標資源類型。

接受的值: vnetGateway, vpnConnection
--watcher-rg

監看員所屬的資源群組名稱。

全域參數
--debug

增加記錄詳細信息以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。