Powershell error returning hashtable Powershell error returning hashtable powershell powershell

Powershell error returning hashtable


When you uncomment # $hashtable you're outputting two things from the function. The result of the function is everything 'output' from it, and PowerShell will automatically wrap multiple outputs into an array. The return statement is a short-circuit convenience and should not be confused with the only way to return a value from the function.