Get-ADGroup and Get-ADGroupMember in table format for SQL
<p>I'm looking for assistance in getting writing a query that will pull the members for each one of the groups in the query below.</p>

<pre><code>Get-ADGroup -Filter 'GroupCategory -eq "Security"' -Properties ManagedBy |
  Where-Object {$_.ManagedBy -gt 0 -or $_.Notes -like "*Approval*"} |
  Select-Object Name
</code></pre>

<p>I would like the table to look something like this (Sorry about the bad table formatting):</p>

<pre>GroupName | GroupMember
Sec_Domain Admins | Username 1
Sec_Domain Admins | Username 2
Sec_EnterpriseAdmins | Username 1
Sec_Enterprise Admins | Username 3</pre>

<p>I'm having a hard time joining <code>Get-ADGroup</code> and <code>Get-ADGroupMember</code> together to output a table with the group and group members in a table format for uploading into SQL.</p>