You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

9 lines
618 B

# Powershell Script for adding mail contacts
# Command to emulate:
#
# New-Mailcontact -Name <NAME> -ExternalEmailAddress: <email> -OrganizationalUnit dw.hfecorp.loca/Contacts -Alias <name with no spaces>
#
# use the following command for a test import that doesn't edit live data.
# Import-CSV contacts.csv | ForEach-Object {New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit $_.OrganizationalUnit -WhatIf}
Import-CSV contacts.csv | ForEach-Object {New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit $_.OrganizationalUnit}