Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

Remote mailbox creation help on powershell

$
0
0

HI, I am bit confused with the powershell commands and was not able to get the best answer for below. I created an csv file with one column called "userprincipalname" and added all the user ID's as 123@test.com.

The script that i used is 

//////

$csvfile= Import-Csv "C:\users.csv"

Foreach($user in $csvfile){
$userprincipalname = $_.userprincipalname
Enable-RemoteMailbox -Identity $userprincipalname@company.com -RemoteRoutingAddress $userprincipalname@company.mail.onmicrosoft.com

}

////////////////

Can anyone of powershell guru help to validate if I am using right one or need to make any changes? 


Viewing all articles
Browse latest Browse all 4521

Trending Articles



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