InitialSessionStateEntryCollection Generic Class

Provides a collection of session state entries, such as commands, types, formats, and variables, for an InitialSessionState object. This class cannot be inherited. This class is introduced in Windows PowerShell 2.0.


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

'Usage
Dim instance As InitialSessionStateEntryCollection(Of T)

[DefaultMemberAttribute("Item")] 
public sealed class InitialSessionStateEntryCollection<T> : IEnumerable<T>, IEnumerable where T : InitialSessionStateEntry

GenericParameters

T

A type parameter that is convertible to an InitialSessionStateEntry.

A Windows PowerShell 2.0 example that shows how to add two variables to the initial session state.

InitialSessionState iss = InitialSessionState.CreateDefault();

This collection is used by several properties of the InitialSessionState class, such as the Variables property that defines the variables of the initial session state.


System.Object
  System.Management.Automation.Runspaces.InitialSessionStateEntryCollection

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft