Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Using PowerShell to send an email based on an SQL Query output.

$
0
0

We use ControlM for scheduling of all our maintenance. This means we need all of our jobs to have some sort of output that our monitoring can interpret. Case in point. I have a script to call an SQL Stored Proc. I need some sort of output that verifies it ran. I know the default is returning a zero. So I'm trying to craft a couple lines in that PS script to send an email if the result is anything other than a zero. Frankly I'm stuck. I don't know where to start, any insight?


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>