Happy Saturday all,
I recently started using a ps script to add all new users to my domain. I add the names to a .csv like
cn,sAMAccountName,FirstName,LastName
John Doe,john.doe,John,Doe
Then the PS script looks like this
#Map Variable from Data Source
$dataSource=import-csv "New Users.csv"
foreach($dataRecord in $datasource) {
$sAMAccountname=$dataRecord.sAMAccountName
$fn=$dataRecord.FirstName
$ln=$datarecord.LastName
#Create Mailbox
enable-mailbox -identity $sAMAccountname -PrimarySmtpAddress ($sAMAccountName + "@oaklawn.org")
#Add X500
$xname = $fn + $ln
Set-MailBox $sAMAccountName -EmailAddresses @{Add="X500:/o=Oaklawn/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=" + $xname.ToLower()}
}
The users I add with this script dont show up on people using the Outlook 2010 client in cached exchange mode, they are in the GAL in OWA. I set logging to medium for the OAL Generator and see this for all the mailboxes I create with this script
OALGen will skip user entry 'Doe, John (OL)' in address list '\Global Address List' because the SMTP address '' is invalid.
- Default Offline Address Book
Thanks in advance for your help on a Saturday!
JF