Disable mailbox with powershell

I have users in a OU which needs to have disabled their mailbox.
Since there are alot of users i want to create a powershell script to do so.

What i have come up with so far is
Get-User -OrganizationalUnit "xxx.xx/Users/Disable/" | Disable-Mailbox

My question is now.....Is it really that simple? :D
SonOfStockhesAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
SonOfStockhesAuthor Commented:
Thanks it worked really good.

I think i love powershell :D
0
 
Lance_PCommented:
I have a notepad with my fav commands. Makes life easy :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.