Quest cmdlets to Update Primary SMTP for a list of users
I have a .csv file which has a list of display names and their corresponding email addresses (Mail Attribute). I am trying to update these email addresses as Primary SMTP of those objects as these objects are either missing/ having invalid Primary SMTP addresses.
I am using the script as below:
Get-Content .\proxyadd.csv | ForEach-Object {$flds = $_.split("`t");Get-QADUser $flds[0] | Add-QADProxyAddress -Address $flds[1] -Primary:$true}
But i am getting an error message saying that it cannot validate argument on Parameter "Address"
Please guide me with this or if you have any other way of updating the Primary SMTP with the list of CNs and email addresses
May 7th, 2012 2:17am
On Mon, 7 May 2012 06:17:47 +0000, Frederick Bastian wrote:
>
>
>I have a .csv file which has a list of display names and their corresponding email addresses (Mail Attribute). I am trying to update these email addresses as Primary SMTP of those objects as these objects are either missing/ having invalid Primary SMTP
addresses.
>
>I am using the script as below: Get-Content .\proxyadd.csv | ForEach-Object {$flds = $_.split("`t");Get-QADUser $flds[0] | Add-QADProxyAddress -Address $flds[1] -Primary:$true}
>
>But i am getting an error message saying that it cannot validate argument on Parameter "Address"
Are you sure the problem isn't that the *existing* proxy addresses are
causing the problem? You say that they have missing proxy addresses or
invalid proxy addresses. If they don't have a primary SMTP proxy then
why not use the E-mail Address Policy to correct that? Just make some
innocuous change to the user -- that should cause the EAP to update
the address.
For the invalid proxy addresses you may be looking at using ADSI to
fix those.
>
>Please guide me with this or if you have any other way of updating the Primary SMTP with the list of CNs and email addresses
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 7:58pm
Hi Rich,
Thanks for the reply, I am in the process of working out objects having OAB issues. I have a list of around 1000 objects which do not appear in Offline Address Book as they don't have a Primary SMTP or the Primary SMTP does not match the "mail" attribute.
I have already corrected the mismatch issue with another script.
Now i have more than 500 objects which do not have a Primary SMTP. So i exported the mail attribute of those objects and thought of making them as Primary SMTP with a script as it will be hard to edit them manually with adsi. That's why i tried to use the
script which i have given.
Thanks & Regards
Frederick
May 8th, 2012 12:36am
On Tue, 8 May 2012 04:36:07 +0000, Frederick Bastian wrote:
>Thanks for the reply, I am in the process of working out objects having OAB issues. I have a list of around 1000 objects which do not appear in Offline Address Book as they don't have a Primary SMTP or the Primary SMTP does not match the "mail" attribute.
I have already corrected the mismatch issue with another script.
>
>Now i have more than 500 objects which do not have a Primary SMTP.
Why are they not subject to an Email Address Policy?
>So i exported the mail attribute of those objects and thought of making them as Primary SMTP with a script as it will be hard to edit them manually with adsi. That's why i tried to use the script which i have given.
Well, your problem is caused by something slapping a value into the
"mail" attribute when the AD object was created (or after it was
created).
How did you get to the point where you had no primary SMTP proxy? It
sounds like you have some script messing around to the proxyAddresses
property using ADSI.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 10:04pm