Solved

Powershell Enable-MailContact not working for me

Posted on 2010-09-03
3
931 Views
Last Modified: 2012-05-10
Hello all,

For some reason I can't seem to get this to work.  the CSV file only has one user in it as I am testing and the fieds are name,externaladdress as suggested by MS.  I looks like it is reading the file, but can't find the user for some reason.  the user UIDEB4IB was imported and the email address is already there, it just doesn't show up in the GAL.  Also I tried it through the EMC with another user and it imported correctly.  I have about 500 users to do and I would really llike to not have to do this manually if at all possible.

[PS] C:\Windows\system32>import-csv "h:\TestMailEnable1.csv" | ForEach-Object {Enable-MailContact -Idnetity $_.name -ExternalEmailAddress $_.externaladdress}
A positional parameter cannot be found that accepts argument 'UIDEB4IB'.
    + CategoryInfo          : InvalidArgument: (:) [Enable-MailContact], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Enable-MailContact

If anyone has any ideas I would greatly appreciate it.
Thanks,
Drew
0
Comment
Question by:adpavlak
  • 2
3 Comments
 
LVL 32

Expert Comment

by:endital1097
ID: 33597421
i just want to verify that you have contact entries already in active directory and you are trying to mail enabled them
0
 
LVL 32

Accepted Solution

by:
endital1097 earned 250 total points
ID: 33597504
because based on syntax your script is correct (except Identity is misspelled)
0
 

Author Comment

by:adpavlak
ID: 33597885
That was it.  I looked at it I can't tell you how many times and passed right over it.  Thanks!
Drew
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now