Link to home
Start Free TrialLog in
Avatar of SonOfStockhes
SonOfStockhesFlag for Denmark

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Lance_P
Lance_P

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SonOfStockhes

ASKER

Thanks it worked really good.

I think i love powershell :D
Avatar of Lance_P
Lance_P

I have a notepad with my fav commands. Makes life easy :)