Squan_JRP Posted August 27, 2017 Posted August 27, 2017 At the beginning of year year I have to create mailboxes for any new students in a particular OU. In the past I have accomplished this by using powershell like : Get-User -OrganizationalUnit "domain.local/SchoolA/Users/Students/09" | Enable-Mailbox The problem with this is, when users in that OU already have a mailbox it creates a problem and doesn't just error out on those users. It seems to create incorrect aliases for the new users and the existing users go back to being "User" mailboxes instead of being O365 mailboxes (we're running in a hybrid environment). Is there a clean way with powershell to enable-mailbox on a whole OU but skip any accounts that already have a mailbox? Any help would be appreciated.
dapaulio Posted August 28, 2017 Posted August 28, 2017 Try adding between the ou switch and the pipe... -recipienttypedetails user | enable-mailbox
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now