Session
PowerShell with SQL Statement Data Gathering
Sometimes service monitoring is not straight forward, it is not as simple as checking whether a service or process is running on a server. What if you need to monitor for a service, but whether a service is successful is determined by the data in a database. I have created a PowerShell Module that will connect to a SQL database, retrieve the appropriate data, and determine whether the service is successful by the data retrieve from the SQL query. The module will then send an email to specific users on the status of a service. I automated the module to run once a day on a scheduled task, but it can be run more frequently if needed. I will explain the code in the PowerShell Module, including the SQL that is used to retrieve the data. The module can be expanded on if needed or it can be used as an example for your own SQL Query PowerShell Scripts.

Bruce Stump
Everwise Credit Union, Systems Administrator
South Bend, Indiana, United States
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top