InitialSessionState.Create Method

Definition

Overloads

Create(String)

Want to get away from SnapIn and console file. Have modules and assemblies instead. Specify the registered SnapIn name or name collection.

Create(String[], PSConsoleLoadException)
Create()

Creates an empty InitialSessionState object...

Create(String)

Want to get away from SnapIn and console file. Have modules and assemblies instead. Specify the registered SnapIn name or name collection.

C++
public:
 static System::Management::Automation::Runspaces::InitialSessionState ^ Create(System::String ^ snapInName);

Parameters

snapInName
String

Returns

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

Create(String[], PSConsoleLoadException)

C++
public:
 static System::Management::Automation::Runspaces::InitialSessionState ^ Create(cli::array <System::String ^> ^ snapInNameCollection, [Runtime::InteropServices::Out] System::Management::Automation::Runspaces::PSConsoleLoadException ^ % warning);

Parameters

snapInNameCollection
String[]

Returns

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

Create()

Creates an empty InitialSessionState object...

C++
public:
 static System::Management::Automation::Runspaces::InitialSessionState ^ Create();

Returns

Applies to

PowerShell SDK 7.4.0 and other versions
Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0