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 corp.com -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:

https://social.technet.microsoft.com/Forums/windowsserver/en-US/de1431b6-190c-4779-8b44-b2c33b22fc15/powershell-determining-if-a-gpo-is-linked?forum=winserverpowershell

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…

https://blogs.technet.microsoft.com/ashleymcglone/2013/05/29/dude-wheres-my-gpo-using-powershell-to-find-all-of-your-group-policy-links/