I am using this script to export empty groups from a given list , it is working but not giving output in file ,
$groups = get-content “path\grouplist.txt”
foreach($group in $groups){
Get-sADGroup -identity $group -Properties members | where {-not $_.members} | select Name | Export-Csv path\emptygroups.csv –NoTypeInformation
}