Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 19214

PS Scripted mailboxes dont show up in OAB

$
0
0

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


Viewing all articles
Browse latest Browse all 19214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>