Created
October 15, 2015 21:17
-
-
Save jeffgreenca/6c00ca3536c75be83c8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Run from SQL Server Powershell session SQLSERVER:\SQL\<servername>\DEFAULT\jobserver\jobs\ | |
$badJobs = @() | |
gci | foreach { | |
if($_.jobsteps[0] -match "Primary") { | |
echo "JOB: $($_.Name)" | |
echo "Has jobstep $($_.JobSteps[0].Name)" | |
} else { | |
$badJobs += $_.Name | |
} | |
} | |
echo "Potentially Bad Jobs" | |
echo $badJobs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment