2.2.2.10 CREATE_PIPELINE Message

The Data field of a PSRP message specifies a CREATE_PIPELINE message when the MessageType field has a value of 0x00021006.

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).

  • Whether the pipeline will take input.

    • Property name: NoInput.

    • Property type: Boolean (see section 2.2.5.1.3).

  • 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).

  • Stream options that indicate how an application MUST treat messages from debug, verbose, warning and error streams in the remote invocation scenario.

    • Property name: RemoteStreamOptions.

    • Property type: RemoteStreamOptions (see section 2.2.3.8).

  • Boolean indicating if the higher layer is to add the pipeline being executed to the history field of the runspace. The PSRP layer MUST NOT interpret this data.

    • Property name: AddToHistory.

    • Property type: Boolean (see section 2.2.5.1.3).

  • Host information.

    • Property name: HostInfo.

    • Property type: HostInfo (see section 2.2.3.14).

  • Description of the pipeline to create.

    • Property name: PowerShell.

    • Property type pipeline (see section 2.2.3.11)

  • Boolean indicating whether the higher layer is to run the pipeline in nested or steppable mode. The PSRP layer MUST NOT interpret this data.

    • Property name: IsNested.

    • Property type: Boolean (see section 2.2.5.1.3).

The Complex Object described in this section SHOULD have no associated type names (section 2.2.5.2.3).

Example:

   <Obj RefId="0">
   <MS>
     <Obj N="PowerShell" RefId="1">
       <MS>
         <Obj N="Cmds" RefId="2">
           <TN RefId="0">
             <T>System.Collections.Generic.List`1[[System.Management.Automation.PSObject, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
             <T>System.Object</T>
           </TN>
           <LST>
             <Obj RefId="3">
               <MS>
                 <S N="Cmd">123 </S>
                 <B N="IsScript">true</B>
                 <Nil N="UseLocalScope" />
                 <Obj N="MergeMyResult" RefId="4">
                   <TN RefId="1">
                     <T>System.Management.Automation.Runspaces.PipelineResultTypes</T>
                     <T>System.Enum</T>
                     <T>System.ValueType</T>
                     <T>System.Object</T>
                   </TN>
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="MergeToResult" RefId="5">
                   <TNRef RefId="1" />
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="MergePreviousResults" RefId="6">
                   <TNRef RefId="1" />
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="MergeError" RefId="7">
                   <TNRef RefId="1" />
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="MergeWarning" RefId="8">
                   <TNRef RefId="1" />
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="MergeVerbose" RefId="9">
                   <TNRef RefId="1" />
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="MergeDebug" RefId="10">
                   <TNRef RefId="1" />
                   <ToString>None</ToString>
                   <I32>0</I32>
                 </Obj>
                 <Obj N="Args" RefId="11">
                   <TNRef RefId="0" />
                   <LST>
                     <Obj RefId="7b">
                       <MS>
                         <Nil N="N" />
                         <S N="V">powershell.exe</S>
                       </MS>
                     </Obj>
                   </LST>
                 </Obj>
               </MS>
             </Obj>
           </LST>
         </Obj>
         <B N="IsNested">false</B>
       </MS>
     </Obj>
     <B N="NoInput">true</B>
     <Obj N="ApartmentState" RefId="12">
       <TN RefId="2">
         <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="RemoteStreamOptions" RefId="13">
       <TN RefId="3">
         <T>System.Management.Automation.RemoteStreamOptions</T>
         <T>System.Enum</T>
         <T>System.ValueType</T>
         <T>System.Object</T>
       </TN>
       <ToString>AddInvocationInfo</ToString>
       <I32>15</I32>
     </Obj>
     <B N="AddToHistory">false</B>
     <Obj N="HostInfo" RefId="14">
       <MS>
         <B N="_isHostNull">true</B>
         <B N="_isHostUINull">true</B>
         <B N="_isHostRawUINull">true</B>
         <B N="_useRunspaceHost">true</B>
       </MS>
     </Obj>
     <B N="IsNested">false</B>
   </MS>
 </Obj>