共用方式為


InitialSessionState.ImportPSModule Method

Definition

Overloads

ImportPSModule(IEnumerable<ModuleSpecification>)

Add a list of modules to import when the runspace is created.

ImportPSModule(String[])

Add a list of modules to import when the runspace is created.

ImportPSModule(IEnumerable<ModuleSpecification>)

Add a list of modules to import when the runspace is created.

public:
 void ImportPSModule(System::Collections::Generic::IEnumerable<Microsoft::PowerShell::Commands::ModuleSpecification ^> ^ modules);
public void ImportPSModule (System.Collections.Generic.IEnumerable<Microsoft.PowerShell.Commands.ModuleSpecification> modules);
member this.ImportPSModule : seq<Microsoft.PowerShell.Commands.ModuleSpecification> -> unit
Public Sub ImportPSModule (modules As IEnumerable(Of ModuleSpecification))

Parameters

modules
IEnumerable<ModuleSpecification>

The modules, whose specifications are specified by modules, to add.

Applies to

ImportPSModule(String[])

Add a list of modules to import when the runspace is created.

public:
 void ImportPSModule(cli::array <System::String ^> ^ name);
public:
 void ImportPSModule(Platform::Array <Platform::String ^> ^ name);
void ImportPSModule(std::Array <std::wstring const &> const & name);
public void ImportPSModule (string[] name);
public void ImportPSModule (params string[] name);
member this.ImportPSModule : string[] -> unit
Public Sub ImportPSModule (name As String())
Public Sub ImportPSModule (ParamArray name As String())

Parameters

name
String[]

The modules to add.

Applies to