Posts

Showing posts with the label New-ADObject

create AD contacts, Bulk create AD contacts - Active Directory PowerShell

Image
Create AD contacts, Bulk create AD contacts - Active Directory PowerShell Create AD contact To create a single AD contact, use the below powershell command. New-ADObject -Type "Contact" -Name "Displayname" -DisplayName "Displayname" -Description "Description" -Path "OU=Contacts,DC=domain,DC=com" -OtherAttributes @{ sn="surname";givenName="firstname";mail="externalemailaddress";mailNickname="sn.gn";targetAddress="SMTP:externalemailaddress";title="title";physicalDeliveryOfficeName="officelocation"} Bulk create AD contacts Create a csv file (contact_creation.csv) for the contacts with their external email address, user details description. The Column names as in the below snapshot . Open Active directory powershell as an administrator and run the below command to create contacts in bulk. $users= Import-csv " contact_creation.csv " f...