次の方法で共有


ScriptRequiresException Class

Definition

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

public ref class ScriptRequiresException : System::Management::Automation::RuntimeException
[System.Serializable]
public class ScriptRequiresException : System.Management.Automation.RuntimeException
public class ScriptRequiresException : System.Management.Automation.RuntimeException
[<System.Serializable>]
type ScriptRequiresException = class
    inherit RuntimeException
type ScriptRequiresException = class
    inherit RuntimeException
Public Class ScriptRequiresException
Inherits RuntimeException
Inheritance
ScriptRequiresException
Attributes

Constructors

ScriptRequiresException()

Constructs an PSVersionNotCompatibleException.

ScriptRequiresException(SerializationInfo, StreamingContext)
Obsolete.

Constructs an PSVersionNotCompatibleException using serialized data.

ScriptRequiresException(String, Exception)

Constructs an PSVersionNotCompatibleException.

ScriptRequiresException(String)

Constructs an PSVersionNotCompatibleException.

Properties

CommandName

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

ErrorRecord

Additional information about the error.

(Inherited from RuntimeException)
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.

WasThrownFromThrowStatement (Inherited from RuntimeException)

Methods

GetObjectData(SerializationInfo, StreamingContext)

Gets the serialized data for the exception.

GetObjectData(SerializationInfo, StreamingContext)

Serializer for ISerializable

(Inherited from RuntimeException)

Applies to