Hi,
I need to extract every month the user list which have their email information on it, so i don't need to extract the user services etc from the AD.
Today, i'm using this script i made :
clear-host
Import-Module activedirectory
$CurrentDate = Get-Date
$CurrentDate = $CurrentDate.ToString('dd-MM-yyyy')
Get-ADUser -Filter * -server ad.test -SearchBase "dc=ad,dc=test" -Properties DisplayName,sn,givenname,Company,Description,EmailAddress | select DisplayName,sn,givenname,Company,Description,EmailAddress | export-clixml "C:\users_$CurrentDate.xml"But like this i have every user of the ad even the ones without email.
Is there any filter to only extract theses one ?
Thanks for your help.