errant powershell command to update sender authentication
This is curious because it seems logical enough that it should work. I use a similar command all the time to create new contacts and distribution groups but maybe it cannot be used to modify properties
I need to uncheck all of the Require All Senders to be authenticated boxes on all the distribution groups and I dont want to do this by hand for 200 groups.
So I exported the group list to a csv and cleared out everything but the display names in excel and re-saved it as a csv. Then I tried using
Import-Csv groupstest.csv | ForEach { Set-DistributionGroup -identity $_.displayName -RequireSenderAuthenticationEnabled $False }
However it returns:
Set-DistributionGroup : Cannot bind argument to parameter 'Identity' because it
is null.
At line:1 char:70
+ Import-Csv groupstest.csv | ForEach { Set-DistributionGroup -identity <<<< $
_.displayName -RequireSenderAuthenticationEnabled $False }
Set-DistributionGroup : Cannot bind argument to parameter 'Identity' because it
is null.
At line:1 char:70
+ Import-Csv groupstest.csv | ForEach { Set-DistributionGroup -identity <<<< $
_.displayName -RequireSenderAuthenticationEnabled $False }
Anyone have any clues as to why this might not work or what I can do to achieve what I want?
Thanks
July 16th, 2008 3:10pm
If I understood correctly, you want to uncheck Require All Senders to be authenticated on the distribution lists in your environment.
Well here is one liner for it
Get-DistributionGroup | where {$_.RequireSenderAuthenticationEnabled -eq $True} | Set-DistributionGroup -RequireSenderAuthenticationEnabled $False
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2008 8:43pm
If in the event you wanted to use the CSV, say if you didn't want "every" group to be modified as the above. You can use the following:
Import-CSV C:\Groups.csv | % {Set-DistributionGroup -Identity $_.name -RequireSenderAuthenticationEnabled $False}
June 11th, 2012 1:42pm