The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

InitialSessionState.CreateFrom Method (String, PSConsoleLoadException)


Updated: April 27, 2016

Applies To: Windows PowerShell

Creates an InitialSessionState object from a snap-in at a specified path. This method is introduced in Windows PowerShell 2.0.

Namespace:   System.Management.Automation.Runspaces
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

public static InitialSessionState CreateFrom(
	string snapInPath,
	out PSConsoleLoadException warnings


Type: System.String

The path to the snap-in.

Type: System.Management.Automation.Runspaces.PSConsoleLoadException

A PSConsoleLoadException object that contains a warning message.

Return Value

Type: System.Management.Automation.Runspaces.InitialSessionState

Returns an InitialSessionState object that contains elements defined by the snap-in at the specified path.

Return to top

Community Additions