2.2.2.2 INIT_RUNSPACEPOOL Message
The Data field of a PSRP message specifies an INIT_RUNSPACEPOOL message when the MessageType field has a value of 0x00010004.
In messages of this type, the Data field is UTF-8 encoded XML, equivalent to the XML created by serializing a Complex Object (section 2.2.5.2) with the following extended properties (see section 2.2.5.2.9):
Minimum number of runspaces in the RunspacePool
Property name: MinRunspaces
Property type: Signed int (see section 2.2.5.1.11)
Maximum number of runspaces in the RunspacePool
Property name: MaxRunspaces
Property type: Signed int (see section 2.2.5.1.11)
Thread options provided by the higher layer; PSRP MUST NOT interpret this data.
Property name: PSThreadOptions
Property type: PSThreadOptions (see section 2.2.3.6)
Apartment state provided by the higher layer; PSRP MUST NOT interpret this data.
Property name: ApartmentState
Property type: ApartmentState (see section 2.2.3.7)
Host information
Property name: HostInfo
Property type: HostInfo (see section 2.2.3.14)
Application arguments provided by the higher layer; PSRP MUST NOT interpret this data.
Property name: ApplicationArguments
Property type: Primitive Dictionary (see section 2.2.3.18) or Null Value (see section 2.2.5.1.20)
The Complex Object described in this section SHOULD have no associated type names (section 2.2.5.2.3).
Example:
-
<Obj RefId="1"> <MS> <I32 N="MinRunspaces">1</I32> <I32 N="MaxRunspaces">1</I32> <Obj N="PSThreadOptions" RefId="2"> <TN RefId="0"> <T>System.Management.Automation.Runspaces.PSThreadOptions</T> <T>System.Enum</T> <T>System.ValueType</T> <T>System.Object</T> </TN> <ToString>Default</ToString> <I32>0</I32> </Obj> <Obj N="ApartmentState" RefId="3"> <TN RefId="1"> <T>System.Threading.ApartmentState</T> <T>System.Enum</T> <T>System.ValueType</T> <T>System.Object</T> </TN> <ToString>MTA</ToString> <I32>1</I32> </Obj> <Obj N="HostInfo" RefId="4"> <MS> <Obj N="_hostDefaultData" RefId="5"> <MS> <Obj N="data" RefId="6"> <TN RefId="2"> <T>System.Collections.Hashtable</T> <T>System.Object</T> </TN> <DCT> <En> <I32 N="Key">9</I32> <Obj N="Value" RefId="7"> <MS> <S N="T">System.String</S> <S N="V">Windows PowerShell V2 (MS Internal Only)</S> </MS> </Obj> </En> <En> <I32 N="Key">8</I32> <Obj N="Value" RefId="8"> <MS> <S N="T">System.Management.Automation.Host.Size</S> <Obj N="V" RefId="9"> <MS> <I32 N="width">181</I32> <I32 N="height">98</I32> </MS> </Obj> </MS> </Obj> </En> <En> <I32 N="Key">7</I32> <Obj N="Value" RefId="10"> <MS> <S N="T">System.Management.Automation.Host.Size</S> <Obj N="V" RefId="11"> <MS> <I32 N="width">120</I32> <I32 N="height">98</I32> </MS> </Obj> </MS> </Obj> </En> <En> <I32 N="Key">6</I32> <Obj N="Value" RefId="12"> <MS> <S N="T">System.Management.Automation.Host.Size</S> <Obj N="V" RefId="13"> <MS> <I32 N="width">120</I32> <I32 N="height">79</I32> </MS> </Obj> </MS> </Obj> </En> <En> <I32 N="Key">5</I32> <Obj N="Value" RefId="14"> <MS> <S N="T">System.Management.Automation.Host.Size</S> <Obj N="V" RefId="15"> <MS> <I32 N="width">120</I32> <I32 N="height">3000</I32> </MS> </Obj> </MS> </Obj> </En> <En> <I32 N="Key">4</I32> <Obj N="Value" RefId="16"> <MS> <S N="T">System.Int32</S> <I32 N="V">25</I32> </MS> </Obj> </En> <En> <I32 N="Key">3</I32> <Obj N="Value" RefId="17"> <MS> <S N="T">System.Management.Automation.Host.Coordinates</S> <Obj N="V" RefId="18"> <MS> <I32 N="x">0</I32> <I32 N="y">0</I32> </MS> </Obj> </MS> </Obj> </En> <En> <I32 N="Key">2</I32> <Obj N="Value" RefId="19"> <MS> <S N="T"> System.Management.Automation.Host.Coordinates </S> <Obj N="V" RefId="20"> <MS> <I32 N="x">0</I32> <I32 N="y">4</I32> </MS> </Obj> </MS> </Obj> </En> <En> <I32 N="Key">1</I32> <Obj N="Value" RefId="21"> <MS> <S N="T">System.ConsoleColor</S> <I32 N="V">5</I32> </MS> </Obj> </En> <En> <I32 N="Key">0</I32> <Obj N="Value" RefId="22"> <MS> <S N="T">System.ConsoleColor</S> <I32 N="V">6</I32> </MS> </Obj> </En> </DCT> </Obj> </MS> </Obj> <B N="_isHostNull">false</B> <B N="_isHostUINull">false</B> <B N="_isHostRawUINull">false</B> <B N="_useRunspaceHost">false</B> </MS> </Obj> <Nil N="ApplicationArguments" /> </MS> </Obj>