Quantcast
Channel: Office 365 for small business administration - Recent Threads
Viewing all articles
Browse latest Browse all 2721

using the new-mailcontact cmdlet

$
0
0

Hi


Just been using powershell to try and bulk upload contacts to GAL in 365. Have found some useful threads within the forums and have been using recommended powershell commands. I have my csv file created and in the right place, but when i run the command to create the contacts i get an error that powershell doesn't recognise the cmdlet: see below. I am logged into powershell as administrator.

using command:

Import-Csv .\contacts1.csv|%{New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalEmailAddress}


I get error:

The term 'New-MailContact' is not recognized as the name of a cmdlet, function, script file, or operabl
e program. Check the spelling of the name, or if a path was included, verify that the path is correct a
nd try again.
At line:1 char:45
+ Import-Csv .\contacts1.csv|%{New-MailContact <<<<  -Name $_.Name -ExternalEmailAddress $_.ExternalEma
ilAddress}
    + CategoryInfo          : ObjectNotFound: (New-MailContact:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


it repeats the error for each line in my csv file


Any ideas?


Thanks


Steve


Viewing all articles
Browse latest Browse all 2721


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>