hi,
If you love to hate regex (sorry Dave), this also works:
$name = $text -split [environment]::NewLine | foreach { if($_.startswith("Name")){$_.split(":")[1]} }
$name
or
$name = $text -split "`n" | foreach { if($_.startswith("Name")){$_.split(":")[1]} }
$name