About 718,000 results
Open links in new tab
  1. about_Ref - PowerShell | Microsoft Learn

    Sep 29, 2025 · The primary purpose of [ref] is to enable passing PowerShell variables by reference to .NET method parameters marked as ref, out, or in. You can also define your own …

  2. PowerShell Reference Variables

    Sep 7, 2024 · Learn everything about PowerShell Reference Variables and then I have explained how to create and use PowerShell reference variables.

  3. How to define named parameter as [ref] in PowerShell

    Apr 13, 2015 · When passing a [ref] parameter to function, you need to enclose the parameter in parenthesis (). When using a [ref] parameter within a function refer to $variable.value

  4. Reference Variables - PowerShell - SS64.com

    A reference variable ( defined with type: [ref]) is able to change the value of another variable that is passed to it. This means that you can write a function that directly modifies one, (or more …

  5. PowerShell-Docs/reference/7.6/Microsoft.PowerShell

    The primary purpose of [ref] is to enable passing PowerShell variables by reference to .NET method parameters marked as ref, out, or in. You can also define your own PowerShell …

  6. Reference Variables in PowerShell - SPGuides

    Apr 17, 2025 · Learn how to use reference variables in PowerShell to modify values inside functions. Understand syntax, use cases, and practical examples for efficient scripting.

  7. The Best PowerShell Cheat Sheet - LazyAdmin

    Aug 23, 2024 · In this cheat sheet, you will find all the operators, tips on working with variables, flow control statements (if-else, loops, etc), and collections and hashtables. I have also added …

  8. PowerShell Documentation - PowerShell | Microsoft Learn

    Official product documentation for PowerShell. What is PowerShell? Available editions, tools, and technology that supports PowerShell. Connect with other PowerShell users. Communicate …

  9. powershell: how to write-host value from [ref] variable

    Aug 26, 2011 · I'm new to Powershell and I'm trying to work out how to print the value of a [ref] variable from within a function. Here is my test code: function testref ( [ref]$obj1) { $obj1.value …

  10. PowerShell Function Parameters: A Beginner's Guide

    Sep 17, 2025 · Master the PowerShell function parameters to make your scripts more flexible and efficient. Get started with this beginner-friendly tutorial.