Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PSReference Class

Definition

Namespace:
System.Management.Automation
Assembly:
System.Management.Automation.dll
Package:
Microsoft.PowerShell.5.1.ReferenceAssemblies v1.0.0
Package:
System.Management.Automation v7.4.15
Package:
System.Management.Automation v7.5.6
Package:
System.Management.Automation v7.6.1

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Define type for a reference object in PowerShell scripting language.

public ref class PSReference
public class PSReference
type PSReference = class
Public Class PSReference
Inheritance
PSReference

Remarks

This class is used to describe both kinds of references: a. reference to a value: _value will be holding the value being referenced. b. reference to a variable: _value will be holding a PSVariable instance for the variable to be referenced.

A reference is created in following ways, a. value reference $a = [ref] 3 [ref] $a = 3 [ref] $a = $b b. variable reference $a = [ref] $b

Constructors

Name Description
PSReference(Object)

Create an instance of PSReference.

Properties

Name Description
Value

Get and set value of PSReference.

Applies to