You could script such a system, but there is a difference between Security groups and Distribution groups.
Distribution groups get email addresses by default in a normal setup, Security groups do not.
In order for a Security Group to be used to control access to an Exchange resource, it must be something called a "Mail-enabled Security Group" which is a Security Group that has been given status as a Distribution Group.
There are a few ways to accomplish this depending on your setup. But the first thing to do is to make sure the scope of the group is set to Universal.
Then it's perhaps easiest to use Powershell:
Enable-DistributionGroup -Identity "Server Lab 222"
There are plenty of parameters you can use with this, but basically it'll take the Security Group "Server Lab 222" and mail-enable it, giving it an email address.
Update
Then use the command Disable-DistributionGroup
. It's got the same syntax.
You may want to try creating a few groups with different settings to see if there are circumstances where the groups are created with email addresses.
Like I said earlier though, if you're using a security group to control access to any Exchange resources, that group will be mail-enabled by requirement.
See here for more information: https://technet.microsoft.com/en-us/library/bb123805%28v=exchg.141%29.aspx?f=255&MSPPError=-2147217396
Sorry if I was unclear, but I do not want them to have e-mail addresses.
I want to get rid of the e-mail addresses, they are just security groups controlling access to a share. – Alex.T – 2017-04-07T17:10:02.557
See update for additional information. There's not really a way to tell how security groups got email addresses if they weren't added on purpose. – music2myear – 2017-04-07T17:13:51.367