I want to get a .csv file listing the members (and email addresses) of all the distribution groups in one OU in Active Directory. I have found code that is supposed to do this but when I run it in the PowerShell command window I get this error:
Get-DistributionGroup : The term 'Get-DistributionGroup' is not recognized as the name of a cmdlet, function, script file, or operable program.
The forum where I got that is from 2012 so has that command been deprecated?
Bottom line is, can someone provide this script?