New GPOs: how to show what they are linked to

I created a bunch of GPOs and have enumerated them with this code:

Get-GPO -Server -All | ? {$_.DisplayName -match "DEV-"} | select DisplayName,Description

…but how can I also show the GPO’s they are now linked to?

I looked at GPLink but nothing useful there, I think.

I searched for “powershell get gpo link status” and I found this link:

seems promising but really couldn’t get it to run with out errors. I’ve tried replacing certain values with those in my environment but missing something. I’d be seeking all GPOs with the “DEV-” in the name and linked.

Function Get-AllGPO
	Get-GPOReport -all -ReportType xml | %{
		([xml]$_).gpo | select name,@{n="SOMName";e={$_.LinksTo | % {$_.SOMName}}},@{n="SOMPath";e={$_.LinksTo | %{$_.SOMPath}}}

#Get Gpo with name Turn* and display what OU is linked.
Get-AllGPO | ? {$_.Name -match "DEV-"} | %{$_.SomName}

…not sure why the author would use a pipeline variable like this $_.SOMName however…