Jump to content

Recommended Posts

Posted

Morning,

 

I just want to check my logic before I break stuff. All my new year 7s have the wrong alias on their exchange mailbox, so consequently have the wrong email address. They've done the default firstnamesurname@..... I'd like them all to be the username. I'm going to do this in PowerShell;

 

$mailboxes=get-mailbox -OrganizationalUnit "Intake 16"

foreach($mailbox in $mailboxes) {set-mailbox -id $mailbox -alias $mailbox.samaccountname}

 

 

That's correct isn't it?

 

Thank you

 

Stuart

Posted
Maybe set an Email address policy for future use as well might be worthit.

 

I have done now I've realised my predecessor hadn't! I just wanted to make sure my powershell commands were correct for just changing the ones I want to change.

 

Thank you

 

Stuart

Posted
I think you can just just a policy to update your existing ones rather than using a power shell script

 

I couldn't see how to do it to be the same as the username. If you can, then that would be great.

Posted

No, that's the problem I'm trying to sort with Powershell. That should change the alias to be the same as the username, I can then apply a policy as you've pictured. I just want to make sure I'm correct that my commands will only do the ones I want, and not everyone in Exchange.

 

Stuart

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...