Export All Dynamic groups with its membership rules

Hello Guys,

I'm in need of a powershell script to get all dynamic groups in our environment with the membership rules. 

I can get the list using the below script but the membership rules i get is the membership rules plus GUID & SID of the OU's with it which makes it difficult to manage

Import-Module ActiveRolesManagementShell
Get-QADGroup -Proxy -Dynamic $true -DontUseDefaultIncludedProperties -IncludedProperties cn, edsaDGConditionsList |
Select-Object -Property cn, edsadgconditionslist |
Export-Csv -Path C:\TEMP\DynamicGroups.csv -NoTypeInformation

the below script can get just the membership rule perfectly but of single groups

$MU = (get-qadgroup $Groupname -Proxy).DirectoryEntry.MembershipRuleCollection

$MU | select base, Filter, Type | fl

How can i combine both the scripts & get the desired inputs, i want the name of the groups and with the exact membership rules starting with e.g. "(&(objectclass= "

Parents Reply Children
No Data