Windows Dev Center

PSObject Constructor (Object)

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)

Dim obj As Object

Dim instance As New PSObject(obj)

public PSObject (
	Object obj
public PSObject (
	Object obj
public function PSObject (
	obj : Object



The base object of type Object that is encapsulated.

Exception typeCondition

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


Target Platforms

© 2015 Microsoft