HiI am trying to create an agent job that looks for a file to exist and file if the file is not fount. I am using a try\catch block but the job will not fail. Any ideas?try { Get-Item -Path E:\Migration Files\myfile.txt -ErrorAction Stop} catch { # File Does Not Exist}
↧