<p>You can do this in PowerShell pretty easily. I’m sure you can do it with the ds tools too, but they’re old and crusty and PowerShell should be used for everything possible nowadays.</p>
<pre><code class="lang-auto">Import-Module ActiveDirectory
(Get-ADUser userName –Properties MemberOf | Select-Object MemberOf).MemberOf
</code></pre>
<p>Shorter version</p>
<pre><code class="lang-auto">(Get-ADUser userName –Properties MemberOf).MemberOf
</code></pre>