2.2.3.25 PSCredential

This data type represents a user name and a password.

This data type is a Complex Object (see section 2.2.5.2 and 2.2.5.2.8) with the following adapted properties (see section 2.2.5.3.4.1):

  • User name

    • Property name: UserName

    • Property type: String (see section 2.2.5.1.1).

  • Password.

    • Property name: Password

    • Property type: Secure String (see section 2.2.5.1.24).

The Complex Object described in this section MUST have the following type names (section 2.2.5.2.3):

  • System.Management.Automation.PSCredential

  • System.Object

Example (inside a PIPELINE_HOST_RESPONSE message):

 <Obj RefId="0">
   <MS>
     <Obj N="mr" RefId="1">
       <TN RefId="0">
         <T>System.Collections.Hashtable</T>
         <T>System.Object</T>
       </TN>
       <DCT>
         <En>
           <S N="Key">Credential</S>
           <Obj N="Value" RefId="2">
             <TN RefId="1">
               <T>System.Management.Automation.PSCredential</T>
               <T>System.Object</T>
             </TN>
             <ToString>System.Management.Automation.PSCredential</ToString>
             <Props>
               <S N="UserName">\username</S>
               <SS N="Password">np7uo8n2ZhbN5Pp9LMpf03WLccPK1NQWYFQrg1UzyA8=</SS>
             </Props>
           </Obj>
         </En>
       </DCT>
     </Obj>
     <I64 N="ci">1</I64>
     <Obj N="mi" RefId="3">
       <TN RefId="2">
         <T>System.Management.Automation.Remoting.RemoteHostMethodId</T>
         <T>System.Enum</T>
         <T>System.ValueType</T>
         <T>System.Object</T>
       </TN>
       <ToString>Prompt</ToString>
       <I32>23</I32>
     </Obj>
   </MS>
 </Obj>