Udostępnij za pośrednictwem


ScriptRequirements Class

Definition

public ref class ScriptRequirements
public class ScriptRequirements
type ScriptRequirements = class
Public Class ScriptRequirements
Inheritance
ScriptRequirements

Constructors

ScriptRequirements()

Properties

IsElevationRequired

Specifies if this script requires elevated privileges, specified like: #requires -RunAsAdministrator If nothing is specified, this property is false.

RequiredApplicationId

The application id this script requires, specified like: #requires -Shellid Shell If no application id has been specified, this property is null.

RequiredAssemblies

The assemblies this script requires, specified like: #requires -Assembly path\to\foo.dll#requires -Assembly "System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" If no assemblies are required, this property is an empty collection.

RequiredModules

The modules this script requires, specified like: #requires -Module NetAdapter#requires -Module @{Name="NetAdapter"; Version="1.0.0.0"} If no modules are required, this property is an empty collection.

RequiredPSEditions

The PowerShell Edition this script requires, specified like: #requires -PSEdition Desktop If no PSEdition has been specified, this property is an empty collection.

RequiredPSVersion

The PowerShell version this script requires, specified like: #requires -Version 3 If no version has been specified, this property is null.

RequiresPSSnapIns

The snapins this script requires, specified like: #requires -PSSnapin Snapin#requires -PSSnapin Snapin -Version 2 If no snapins are required, this property is an empty collection.

Applies to