Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Exchange Server 2010 : Using EMS to Do Administrative Mailbox Tasks (part 1)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
3/24/2011 9:04:28 PM
The Exchange Management Shell makes common mailbox management tasks such as adding, modifying, moving, and deleting mailboxes simple. The flexibility of EMS enables the administrator to easily perform bulk tasks that would require much more time and labor if done from the Exchange Management Console.

Creating Mailboxes with EMS

Mailboxes can be created with EMS singly or in bulk. They can be created using the interactive command prompt or by specifying the required parameters from the command line. To enable a mailbox for an existing AD user or InterOrgPerson using the interactive shell, simply enter:

Enable-mailbox

and answer the prompts for the missing parameters:

Supply values for the following parameters:
Identity: companyabc\claire

The following example creates a mailbox for the existing user Jason in the DB14 mailbox database:

Enable-Mailbox "companyabc\jason" -database "DB14"

Note

The -Database is an optional parameter. If none is specified, the mailbox will be moved to a random database.


The next example demonstrates using EMS to create 1,000 users in AD and create mailboxes for each user in the Test Mailbox database. This single-line cmdlet is useful in lab scenarios.

1..1000 | ForEach {net user "user$_" MyPassword=01 /ADD /Domain; enable-mailbox
"user$_" -database "test mailbox"}


Doing this same operation using VBScript would take many more lines of code and require much more development time.

Modifying Mailboxes with EMS

Mailbox attributes can easily be modified using EMS, as well. The following example modifies the mailbox for user Jason in the default domain to accept only emails from [email protected]:

set-Mailbox jason -AcceptMessagesOnlyFrom [email protected]

It is just as easy to make changes on many mailboxes at the same time using pipelining. Consider the following example that sets the mailbox prohibit send quota for all user mailboxes at 2GB:

get-Mailbox | set-Mailbox -ProhibitSendQuota 2gb

In the following example, we use the –OrganizationalUnit parameter of the Get-Mailbox cmdlet to set the maximum message size that users in the Accounting OU can send to 5MB:

get-Mailbox -OrganizationalUnit "Test Users" | set-Mailbox -MaxSendSize 5mb

Moving Mailboxes Using EMS

Moving mailboxes with the Exchange Management Shell in Exchange Server 2010 is a bit different than it was in previous versions. The move-mailbox cmdlet has been replaced with four new cmdlets: New-MoveRequest, Get-MoveRequest, Set-MoveRequest, and Remove-MoveRequest.

New-MoveRequestBegins the process of a mailbox move.
Get-MoveRequestGets the status of an in-process mailbox move.
Set-MoveRequestChanges move request options after the move has begun.
Remove-MoveRequestCancels an ongoing mailbox move.

When the Move-Mailbox cmdlet is used to move a mailbox, the cmdlet logs into both the source database and the target database and moves the content from one mailbox to the other mailbox. The move process can take several hours to complete, depending on the mailbox size.

The new MoveRequest cmdlets perform an asynchronous mailbox move because they do not perform the actual move. A new Exchange Server 2010 service running on an Exchange Server 2010 Client Access called the Mailbox Replication Service (MRS) actually performs the move. The New-MoveRequest cmdlet simply sends the request to the Mailbox Replication Service. The benefit of using the service is that it enables the administrator to manage mailbox moves from EMS after the move request has been made.

The Set-MoveRequest cmdlet provides the capability to change the options of an in-progress mailbox move. The Get-MoveRequest cmdlet reports the current status of a mailbox move.

The Remove-MoveRequest cmdlet enables the administrator to cancel a move that is in progress. A move can be canceled at any time before the move completes. If a move is canceled, the mailbox remains on the source server and database.

A simple move of a mailbox from one database to another on the same server is accomplished like this:

New-MoveRequest claire –TargetDatabase "accounting database"

Note

The TargetDatabase is an optional parameter. If none is specified, the mailbox will be moved to a random database.


EMS knows the names of all the databases in the organization. If there is more than one database with the same name, EMS moves the database to the first alphabetic server with that database name. To target a specific server, explicitly name the server in the TargetDatabase parameter. For example:

New-MoveRequest claire –TargetDatabase "SERVER2\accounting database"

Note

EMS will accept only the server name in the TargetDatabase parameter if there is more than one database with the same name in the same organization.


More complex moves are achieved just as easily from the Exchange Management Shell command line. In the following example, the mailbox is moved from the companyabc.com forest to the expta.com forest:

New-MoveRequest companyabc\claire -Remote –RemoteHostName mbx1.expta.com
Other -----------------
- SharePoint 2010 PerformancePoint Services : Excel Services Data Source
- SharePoint 2010 PerformancePoint Services : PowerPivot Data Sources
- Windows Server 2003 : Monitoring Network Protocol Security (part 7)
- Windows Server 2003 : Monitoring Network Protocol Security (part 6) - Use Netsh to Manage IPSec
- Windows Server 2003 : Monitoring Network Protocol Security (part 5) - Create a Negotiation Policy
- Windows Server 2003 : Monitoring Network Protocol Security (part 4) - Use the IP Security Management Snap-In to Create a Blocking Policy
- Windows Server 2003 : Monitoring Network Protocol Security (part 3) - Understanding Kerberos
- Windows Server 2003 : Monitoring Network Protocol Security (part 2) - Negotiation Process
- Windows Server 2003 : Monitoring Network Protocol Security (part 1) - Understanding IPSec & Negotiation Configuration
- SharePoint 2010 : Getting to Know the Excel Services Service Application
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server