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?

[Webinar] Streamline your web hosting managementRegister Today

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
All Courses

From novice to tech pro — start learning today.