Anthony K O365
asked on
Creating Distribution Groups in bulk using Powershell---error
I am trying to create Distribution Groups using the following scritp:
Import-CSV "D:\NewDL3.csv" | foreach {New-DistributionGroup -Name $_.name -Type $_.Type }
and I'm getting the following error: (See attachment for csv being used) Any thoughts?
Cannot process argument transformation on parameter 'Type'. Cannot convert null to type "Microsoft.Exchange.Manage ment.
RecipientTasks.GroupType" due to invalid enumeration values. Specify one of the following enumeration values and try again. The possible enumeration values are "Distribution, Security".
+ CategoryInfo : InvalidData: (:) [New-DistributionGroup], ParameterBindin...mationEx ception
+ FullyQualifiedErrorId : ParameterArgumentTransform ationError ,New-Distr ibutionGro up
NewDL3.csv
Import-CSV "D:\NewDL3.csv" | foreach {New-DistributionGroup -Name $_.name -Type $_.Type }
and I'm getting the following error: (See attachment for csv being used) Any thoughts?
Cannot process argument transformation on parameter 'Type'. Cannot convert null to type "Microsoft.Exchange.Manage
RecipientTasks.GroupType" due to invalid enumeration values. Specify one of the following enumeration values and try again. The possible enumeration values are "Distribution, Security".
+ CategoryInfo : InvalidData: (:) [New-DistributionGroup], ParameterBindin...mationEx
+ FullyQualifiedErrorId : ParameterArgumentTransform
NewDL3.csv
Add value security or universal in the type in the csv file and run command again.
try this social.technet.microsoft.c om
http://social.technet.microsoft.com/Forums/en/exchangesvrgeneral/thread/0f86bb8a-63a2-44e5-921f-4a227221e71d
http://social.technet.microsoft.com/Forums/en/exchangesvrgeneral/thread/0f86bb8a-63a2-44e5-921f-4a227221e71d
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, the space in the "Type" column field was the issue!<br /><br />Thanks!