Monday 30 July 2012

Program for Helpdesk people to retrive the information of maiboxes

How to retrieve the Mailbox info from the particular mailbox server

Using the below program, we can extract the details of mailbox information from the specified exchange server. Even if you type the mailbox name instead of typing exchange server name, you will get the mailbox info output. This program is very useful to Helpdesk people to retrieve the info of mailbox information and mailbox server information.
 Please Click Here if you want to know about (if else) statement
If ($arg[0] –eq ‘server’)
{
Write-Host “Retrieving info from the server ” $arg[1]
Get-exchangeserver –server $arg[1] | select name, FQDN, ServerRole, Edition | FL
Write-host “ The mailboxes Hosted on : “ $arg[1]
Get-mailbox –server $arg[1] | select name, severname, database
}
Else
{
Write-host “ Retrieving information of maibox “ $arg[0]
Get-mailbox $arg[0] |select name, servername, database
}
Copy the program in notepad and save it as mailboxinfo.ps1

Output:
C:\temp>.\mailboxinfo.ps1 –server exchageserver1
Retrieving info from the server  exchageserver1
Name:
FQDN:
Server Role:
Edition:
The mailboxes Hosted on : exchageserver1
Name:
Servername:
Database:

Regards,
Sankar M 


No comments:

Post a Comment