Skip to content

Latest commit

 

History

History

PSReference

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

[ref] may be unwrapped unexpectedly

[ref] may be used for functions returning something via [ref] parameters in addition to the output or instead of the output.

See

help about_Ref

There may be problems though when by design [ref] is just one of the possible parameter types. In PowerShell such parameters are normally declared as [object] or [object[]]. Namely, [ref] may be unexpectedly unwrapped or expectedly sent as [ref] depending (surprisingly) on using or omitting the parameter name.

Scripts