InitialSessionState.CreateDefault Method ()

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Creates an InitialSessionState object that contains the default commands provided by Windows PowerShell. 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 CreateDefault()

Return Value

Type: System.Management.Automation.Runspaces.InitialSessionState

Returns an InitialSessionState object that contains the default commands, such as the Get-Help and Get-Command cmdlets.

To create an initial session state that does not include the default commands, call the Create method.

This example shows how to define an initial session state that includes the default commands provided by Windows PowerShell.

InitialSessionState iss = InitialSessionState.CreateDefault();
Return to top

Community Additions

ADD
Show: