How to create many new contact groups with Powershell.

tarou chabi 731 Reputation points
2023-04-11T06:34:06.28+00:00

I want to create many new contact groups from many .csv files in "TEST" folder with Powershell. Please teach me...

  1. $outlook = new-object -comobject Outlook.application;
  2. $namespace = $outlook.GetNameSpace("MAPI");
  3. $contactFolder = $namespace.GetDefaultFolder(10);
  4. $contactFolder.Folders.Add("TEST"); https://support.microsoft.com/en-us/office/create-a-contact-group-or-distribution-list-in-outlook-for-pc-88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023#:~:text=In%20the%20main%20Outlook%20window,Add%20Members%20%3E%20From%20Outlook%20Contacts. https://www.appsloveworld.com/csharp/100/457/how-to-create-a-group-of-contact-folders-in-outlook-via-c
Outlook Windows Classic Outlook for Windows For business
Windows for business Windows Server User experience PowerShell
Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2023-04-11T15:29:29.3966667+00:00

    The code in this article is using VBScript but it should be easy enough to convert it to PowerShell: https://stackoverflow.com/questions/31662962/how-to-use-powershell-to-add-a-contact-to-a-contact-group-on-outlook-2010


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.