Powershell:- Function Invocation Pass Variables By Reference

Background Quick Refresher on Powershell. Specifically, how to pass arguments to functions by value and by reference. Outline Global Variables Declare functionName [string] $global:functionName = ""; Prefix variable name with $global Function Get-FunctionName Function stringConcatByValueAndReference Function Declaration stringConcatByValueAndReference([string]$str1, [string]$str2, [ref]$result) Input Variables str1 and str2 passed by value Output Variable result passed by reference Set … Continue reading Powershell:- Function Invocation Pass Variables By Reference