How — and why — to disable Network Watcher using PowerShell

It happened to me a couple of times already. When you are working with the Network Watcher feature (spoiler alert, new article coming up on this soon), there is one option at the subscription level only (let me get that clear for you --  one option ONLY) to enable monitoring on all-region, but nothing to roll back. If you want to disable Network Watcher using the Azure Portal, you have to expand your subscription and click on each region that you don’t want to monitor and then Disable network watcher, which will give a refresh and collapse the list containing all regions of the subscription.

Let’s say you have two regions to monitor, and you made that mistake. You would spend at least 30 minutes complaining and another 30 minutes to perform the tasks. No worries:  PowerShell and the Get-AZNetworkWatcher command to the rescue!

We can run the following cmdlet to list all regions that are being monitored and the second cmdlet to remove all regions and switch back to Disable Network Watcher.

Get-AZNetworkWatcher | Select Name,Location,ProvisioningState
Get-AZNetworkWatcher | Remove-AZNetworkWatcher

After executing the above cmdlet, the result will be the feature showing as disabled in the Azure Portal. Time to expand your subscription and pick the region that you want to monitor.

Featured image: Pixabay

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides of the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange, CISSP and several other certifications. Anderson contributes to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at Techgenix.com, MSExchange.org, ITPROCentral.com and Anderson Patricio.org (Portuguese).

Share
Published by
Anderson Patricio

Recent Posts

User-friendly web design tools for a user-friendly website

If you want your business to succeed these days, you need a user-friendly website. Put these tools in your toolbox…

9 hours ago

New kids vs. old reliable: Can chat apps replace email?

Do businesses rely too heavily on email for communication? Yes! Is the answer to replace email with chat apps? No!…

14 hours ago

PowerShell function to standardize message box script outputs

If you got your start with Visual Basic, you remember msgbox. This PowerShell function will bring back memories and help…

17 hours ago

Microsoft Ignite 2019: Top announcements and product unveilings

Microsoft Ignite 2019 included a slew of updates on products and services. Among the announcements was Azure Arc, which may…

1 day ago

Who says configuration management can’t be fun?

Managing change in an enterprise isn’t easy and it’s usually no fun. Here’s a book on configuration management that will…

2 days ago

Choosing the right communication tools for your business

Choosing communication tools is like choosing a first progamming language. While you want easy, you also want cross-platform, security, and…

2 days ago