Jan 23 2019 05:16 AM
Hi.
I have a csv file that has the information of 90+ contacts. I have attached the format of the csv file with a dummy entry.
These contacts are required to be imported into a Contact Group in a Shared Mailbox.
I have run the following powershell import command.
Import-ContactList -CSV -CSVData ([System.IO.File]::ReadAllBytes("D:\Users\Administrator\Desktop\TerryAdams.csv")) -DateCultureName "en-GB" -Identity terrya@contoso.edu
This command imports the contacts to 'My Contact' in outlook. Although I can see the Contact Group I need to move them to I am struggling to find a way.
If anyone out there has been successful with doing this or has a way to get round the issue I would like to know.
Thanks.
Jan 23 2019 05:24 AM
Jan 23 2019 06:16 AM
Hi Chris.
The Contact Group in the Shared Mailbox was deleted and can not be recovered. Only certain users have been given access to this Shared Mailbox.
So I am wanting to create the orginal mailbox. I have created the Contact Group I just need to populate it with the contacts from the csv file. If it wasn't for so many contacts I would do it manually.
Thanks for reaching out.
Jan 23 2019 07:46 AM
Jan 23 2019 09:33 AM
If you want to programmatically create a Contact group, you will have to use the EWS API, "pure" PowerShell doesn't have such functionality.
Jan 25 2019 05:35 AM
Hi Vasil.
Creating the Contact Group is not the issue. What I am trying to achieve is to import the contacts from a csv file into the Contact Group.
Not sure if you have a scipt or a way forward to be able to achieve this.
Thanks.
Jan 25 2019 11:43 AM
Still the same answer, you have to use EWS. PowerShell on itself doesn't deal with item-level operations when it comes to Exchange Online, with few minor exceptions. Glen's Contacts module should be able to do it: https://github.com/gscales/Powershell-Scripts/tree/master/EWSContacts
Jan 28 2019 02:39 AM
You could create a new contacts folder, import the CSV to that folder, open the contacts group, add members>from Outlook contacts>select the new contacts folder>bulk select all contacts>click on the "Members" button>OK
All these steps are done in Outlook for PC.
Jan 28 2019 09:43 AM
My assumption is that the author wants to do this programmatically.
Jan 28 2019 09:55 AM
He said "If it wasn't for so many contacts I would do it manually.", so it doesn't look to me like he really cares how he does it as long as it's not too time consuming or labour intensive.