But we also have containers or OU's for Vendors, Customers, Reps, Dealers, ASAs and Distributors. Now I'm seeing all these user objects.. because they access an externally hosted website that uses AD authentication, and wonder why there are not address lists for these so Customer Service or Sales can contact them a little easier.
So here we go.. Mail-Enabling in bulk. I've exported all those OU's out to a tab-delimited CSV, re-arranged the columns to include only Name and ExternalAddress.
get-User -OrganizationalUnit 'domain.com/people/customers' | Export-CSV c:\users\bhart\customers.csv
get-User -OrganizationalUnit 'domain.com/people/customers' | Export-CSV c:\users\bhart\customers.csv
import-csv "c:\users\bhart\customers.csv" | foreach-object {Enable-MailUser -identity $_.Name -ExternalEmailAddress $_.ExternalAddress}
And BOOM
The 100+ user objects are now mail enabled.. well except for the few objects without an ExternalEmailAddress variable, but you get the idea.
Now I just need to go through this process on the remaining 4 other OU's.
No comments:
Post a Comment