Like the title says, I need to change all my distribution groups from the "Universal" group type to "Universal, Security Enabled". I know that by default this is not possible, however it should be somewhat not (too) difficult to come up with a script to do so.
Thus far I've managed to export all my distro group names and its members into separate .csv files.
I need to write a powershell script that will grab the name of each *.csv file and use that variable as the group name, as well as grab the Identity and PrimarySmtpAddress from the worksheet (.csv).
Using the a combination of simple import csv commands: Import-Csv <Path>| foreach {Add-DistributionGroupMember -Identity<Distribution Group Name> -Member $_.identity}
Import-CSV <Path>| foreach {New-DistributionGroup -Name $_.name -Type "Security"}
I want to be able to grab all the names of my *.csv files in my c:\groups\*.csv directory, use the * as the distro group name and grab the first two columns of each file; using column 1 as "Identity" and column 2 as "PrimarySmtpAddress" for each user for every security distro group.
Can this be done? Will some powershell guru step up and give me a headstart to this script!? Thanks!