ScriptExecutionData.FailureReason Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Error message if the script was able to run, but if the script itself had errors or powershell threw an exception
public string FailureReason { get; set; }
member this.FailureReason : string with get, set
Public Property FailureReason As String