Search code examples
powershelloutlookdistribution-list

How to Use PowerShell Create a new Distribution List( Contact Group) on Outlook 2010 Contacts


I want to use PowerShell script to create a new outlook Contact group in contacts.

So far, I have something like this. What do I do next?

$outlook = new-object -com Outlook.Application
$contacts = $outlook.Session.GetDefaultFolder(10)
$newcontact = $contacts.Items.Add()


Solution

  • You need to specify that you want the DL list:

    $dl= $contacts.Items.Add("IPM.DistList")