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
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,808 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
3,116 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,945 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,161 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 45,111 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