Monday, 10 February 2014

How to change the Mailbox Password using shell command

To set a new password for a Mailbox
Set-Mailbox -Identity "Mailbox Name" -Password (ConvertTo-SecureString -String "NewPassword" -AsPlainText -Force)
and to reset the password on next logon
Set-Mailbox -Identity "Mailbox Name" -Password (ConvertTo-SecureString -String "NewPassword" -AsPlainText -Force) -ResetPasswordOnNextLogon $True

How to get the Mailbox Count in Exchange 2010 and Exchange 2013


Getting the total count on the mailbox is very easy using Exchange Management Shell Commands and below are few useful examples
How to get the Mailbox Count in a Database
(Get-Mailbox -ResultSize Unlimited -Database "Database Name").count
How to get the Mailbox count in a Server
(Get-Mailbox -ResultSize Unlimited -Server "Server Name").count
How to get the Mailbox Count from the whole organization
(Get-Mailbox -ResultSize Unlimited ).count
Ok, I got the total count, now are you searching for option on how to get the room mailbox count?
(Get-Mailbox -ResultSize Unlimited -filter (RecipientTypeDetails -Eq "RoomMailbox")).count
How to calculate the Mailbox count which includes the disabled mailboxes in the database
(Get-MailboxStatistics -Database "Database Name").count
Hope its useful for you. Leave your comments if any details required.