Lire en anglais

Partager via


ScriptRequiresException Class

Definition

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

C++
public ref class ScriptRequiresException : System::Management::Automation::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

Applies to

Produit Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0