title: Remove Azure alert rule if exists using Remove-AzScheduledQueryRule
body: <p>How do you check if an alert rule exists by its ResourceId, and then remove it. What is the syntax for the check?</p>
  <pre><code>Get-AzScheduledQueryRule -ResourceId &quot;/subscriptions.....Id&quot;    
  Remove-AzScheduledQueryRule -ResourceId &quot;/subscriptions/.....Id&quot;
  </code></pre>