Azure Application Insight’s web tests enables ping to your application from multiple locations to check availability and alerts you when it is down.
Sometimes you would want to disable it during known downtime, maintenance or deployment.
If you’re using Azure DevOps, you can add the following to your pipeline task to disable and enable your web tests.

Choose script type: PowerShell
Script location: Inline
Inline script for disabling to be set as the first task item
Shell
Inline script for enabling to be set as the last task item
Shell
With this in your pipeline, you don’t have to manually disable and enable inside Application Insights.