Why doesn't the below code print the object values when passed into a function? what am I missing?
$Name=@{}
$Name.firstName="John"
$Name.lastName="Doe"
$NameObj=new-object psobject -property $Name
function GetName([PSObject]$NameObj) {
$NameObj
}
GetName