List failed SQL server Jobs with Powershell

Posted by: SQL Server DBA, on 06 Feb 2012 | View original | Bookmarked: 0 time(s)

This post explains how to list failed SQL Server Jobs , on multiple SQL Server Instances and output the results to a HTML file.  It is only one extra step to send this file as an attachment. The example script , returns failed SQL Server Agent Jobs within the last 48 hrs, for a SQL Server Instance.   $isodate=Get-Date -format s $isodate=$isodate -replace(":","") $basepath=(Get-Location -PSProvider FileSystem).ProviderPath $instancepath=$basepath + "\instances.txt" $outputfile="\logs\sql_server_health_sqlserver_jobs_"...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 396 | Hits: 15

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD