Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Power shell script to add multiple aliases with a .csv file.

$
0
0

I have an email address lets say project@mailserver.org and I need 1000 aliases added to the email. For example Project1@mailserver.org, Project2@mailserver.org etc etc. and I have a .csv file with 990 columns with just project1, project2.

Is there a way to run a command in powershell exchange to import all the aliases I need in a few commands? Can someone point me in the right direction if I am in the wrong forum also? Thanks

No sure if this is correct or not:

> $mbx = Get-Mailbox Project
> Import-CSV "C:\SomePath\wherever.csv" | foreach { $mbx.EmailAddresses += $._SmtpAddress }
> Set-Mailbox project -EmailAddresses $mbx.EmailAddresses


Viewing all articles
Browse latest Browse all 8719

Trending Articles



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