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
Inheritance
ScriptRequiresException

Inherited Members

System.Management.Automation.RuntimeException

Constructors

ScriptRequiresException()

Constructs an PSVersionNotCompatibleException

ScriptRequiresException(String)

Constructs an PSVersionNotCompatibleException

ScriptRequiresException(SerializationInfo, StreamingContext)

Constructs an PSVersionNotCompatibleException using serialized data.

ScriptRequiresException(String, Exception)

Constructs an PSVersionNotCompatibleException

Properties

CommandName

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

MissingPSSnapIns

Gets the missing snap-ins that the script requires

RequiresPSVersion

Gets the PSVersion that the script requires

RequiresShellId

Gets or sets the ID of the shell.

RequiresShellPath

Gets or sets the path to the incompatible shell

Methods

GetObjectData(SerializationInfo, StreamingContext)

Gets the serialized data for the exception.