Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 979
  • Last Modified:

Powershell Enable-MailContact not working for me

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
adpavlak
Asked:
adpavlak
  • 2
1 Solution
 
endital1097Commented:
i just want to verify that you have contact entries already in active directory and you are trying to mail enabled them
0
 
endital1097Commented:
because based on syntax your script is correct (except Identity is misspelled)
0
 
adpavlakAuthor Commented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now