I have several PowerShell tasks that run on a regular basis, and for an unknown reason they intermittently fail. The error output is:
ExecuteProcess("C:\Program Files (x86)\VisualCron\\PowerShell\TaskPowerShell.exe" 5332)->System.IO.IOException: Invalid Signature.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
ExecuteProcess("C:\Program Files (x86)\VisualCron\\PowerShell\TaskPowerShell.exe" 5332)->Unhandled execution error: System.IO.IOException: Invalid Signature.
at TaskPowerShell.PowerShellTaskClass.Run(ProcessPowerShellTaskInfoClass ti, StringBuilder& sbStandardOut, StringBuilder& sbStandardError, Boolean& bolResult)
at mXbZHCH5JIJcqO7o9Q.G35HLSVlxIRLOuifM1.wAF1PkkG4(String[] )
I'm not able to tell why VisualCron was not able to read the file. The task in question is triggered every hour on the hour and works most of the time. The script files reside on an SMB share, and I leverage a VisualCron mapped drive to access the folder. Could this be the cause of the errors and if so, why are they intermittent?