Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Powershell Enable-MailContact not working for me

Posted on 2010-09-03
3
Medium Priority
?
974 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 1000 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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

886 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