Mark Minasi's Tech Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
meloao

Senior Member
Registered:
Posts: 109
Reply with quote  #1 
I need to create Contacts in AD.   This is the first time I have attempted to create a script to do that.

When I run this basic command:

New-MailContact -Name "Melissa TEST"

I get the an error:
The term 'New-MailContact' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.


I think I need to install additional tools on my pc but not sure what. 


 
0
meloao

Senior Member
Registered:
Posts: 109
Reply with quote  #2 
Figured it out.  It should be;

New-ADObject -Name "Melissa TEST" -Type "contact"
0
cj_berlin

Avatar / Picture

Senior Member
Registered:
Posts: 418
Reply with quote  #3 
New-MailContact is an Exchange cmdlet. If you work in the Exchange management shell, you can use it. e-Mail is mandatory, however, because otherwise a contact doesn't make very much sense from Exchange's point of view.
__________________
Evgenij Smirnov

My personal blog (German): http://www.it-pro-berlin.de/
My stuff on PSGallery: https://www.powershellgallery.com/profiles/it-pro-berlin.de/
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.