PSObject Constructor (Object)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Initializes a new instance of the PSObject class that contains a base object of type Object.

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

public PSObject(
	object obj
)

Parameters

obj
Type: System.Object

The base object of type Object that is encapsulated.

Exception Condition
ArgumentNullException

obj is null.

The type name for the created object is a collection of the derivation hierarchy of the base object. For example, the type name for a PSObject object with a ProcessInfo base object would include the following names.

  • System.Diagnostics.Process

  • System.ComponentModel.Component

  • System.MarshalByRefObject

  • System.Object

Return to top

Community Additions

ADD
Show: