# Create a resource group for the Network Watcher instance (if it doesn't already exist).
New-AzResourceGroup -Name 'NetworkWatcherRG' -Location 'chinaeast'
# Create an instance of Network Watcher in China East region.
New-AzNetworkWatcher -Name 'NetworkWatcher_chinaeast' -ResourceGroupName 'NetworkWatcherRG' -Location 'chinaeast'
# Create a resource group for the Network Watcher instance (if it doesn't already exist).
az group create --name 'NetworkWatcherRG' --location 'chinaeast'
# Create an instance of Network Watcher in China East region.
az network watcher configure --resource-group 'NetworkWatcherRG' --locations 'chinaeast' --enabled
备注
使用 Azure CLI 创建网络观察程序实例时:
网络观察程序实例的名称自动设置为 region-watcher,其中 region 对应于网络观察程序实例的 Azure 区域。 例如,在“中国东部”区域启用的网络观察程序名为“chinaeast-watcher”。