I want to create a script which will check if a particular job failed last night. if it failed then the job should be disabled to run next day else should run normally.
I know a bit to write powershell command but don't know to save it as a file and use it similar like currently I am using bat file.