ScriptRequiresException ScriptRequiresException ScriptRequiresException Class

Definition

Defines the exception thrown when a script's requirements to run specified by the #requires statements are not met.

public class ScriptRequiresException : System.Management.Automation.RuntimeException
type ScriptRequiresException = class
    inherit RuntimeException
Public Class ScriptRequiresException
Inherits RuntimeException
Inheritance
ScriptRequiresExceptionScriptRequiresExceptionScriptRequiresException

Constructors

ScriptRequiresException() ScriptRequiresException() ScriptRequiresException()

Constructs an PSVersionNotCompatibleException

ScriptRequiresException(SerializationInfo, StreamingContext) ScriptRequiresException(SerializationInfo, StreamingContext) ScriptRequiresException(SerializationInfo, StreamingContext)

Constructs an PSVersionNotCompatibleException using serialized data.

ScriptRequiresException(String) ScriptRequiresException(String) ScriptRequiresException(String)

Constructs an PSVersionNotCompatibleException

ScriptRequiresException(String, Exception) ScriptRequiresException(String, Exception) ScriptRequiresException(String, Exception)

Constructs an PSVersionNotCompatibleException

Properties

CommandName CommandName CommandName

Gets the name of the script that contained the #requires statement.

ErrorRecord ErrorRecord ErrorRecord Inherited from RuntimeException
MissingPSSnapIns MissingPSSnapIns MissingPSSnapIns

Gets the missing snap-ins that the script requires

RequiresPSVersion RequiresPSVersion RequiresPSVersion

Gets the PSVersion that the script requires

RequiresShellId RequiresShellId RequiresShellId

Gets or sets the ID of the shell.

RequiresShellPath RequiresShellPath RequiresShellPath

Gets or sets the path to the incompatible shell

StackTrace StackTrace StackTrace Inherited from RuntimeException
WasThrownFromThrowStatement WasThrownFromThrowStatement WasThrownFromThrowStatement Inherited from RuntimeException

Methods

GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Gets the serialized data for the exception.

Applies to