Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Extracting values only from PSObject

$
0
0

Hello All

If there an easier way than the following to get just the values from a PSCustom object?

 

$obj=New-Object psobject -Property @{

'name'='ernie'
'age'= 47

}


$obj | gm -MemberType NoteProperty | % {$_.name | % {$obj.$_}}

Thanks
Ernie 

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles