KB No. 1: Easily import your Active Directory users into an awareness campaign
Background
This article aims to show you how to easily import your Active Directory users into an Olfeo Awareness campaign in just three steps.
Prerequisites
Ensure that the Active Directory module for PowerShell is installed on your server or machine where Active Directory is located. If it is not, you can install it by referring to the following documentation.
Step 1: Open PowerShell as an administrator
On your server or machine where Active Directory is installed, open PowerShell as an administrator.
Step 2: Collect User Information
In order to launch a campaign in Olfeo Awareness, we need to collect the email address, first name, and last name of each participant. In an Active Directory directory, this data generally corresponds to the attributes userPrincipalName, givenName, and surname.
Depending on the configuration of your directory, it may be necessary to use other attributes instead of these.
Use the Get-ADUser command to retrieve users and select the desired attributes (userPrincipalName, givenName, surname):
$users = Get-ADUser -Filter * -Property userPrincipalName, givenName, surname | Select-Object userPrincipalName, givenName, surname
Step 3: Export user information to a CSV file
Export the retrieved data to a CSV file with the following command:
$users | Export-Csv -Path "C:\path\to\your\directory\Participantlist.csv" -Delimiter ";" -NoTypeInformation
Once the CSV file has been retrieved, in the first row, replace userPrincipalName, givenName, and surname with email, first_name, and last_name.
You are now ready to create a new awareness campaign by importing the desired participants!