Article Tag Cloud

No of visitors who read this post: 3771
Category: Networking
Type: Article
Author: Russel_sc
Average: 3.3 (4 votes)

Some important Exchange Server 2010 Shell Commands

Though we feel comfortable to use graphical interface to configure Exchange server 2010, besides we can also use shell commands to apply configuration to get quick response. In order to configure Exchange 2010 with shell commands, we need to use EMS (Exchange Management Shell). All commands associated in EMS is called Cmdlet.

Generally EMS has some common verbs for Cmdlet action which are New, Get, Set, Enable, Disable and Remove. All these verbs work with some parameters.

 Here is some useful shell commands and their description to perform Exchange management.

1.    Invoke- item

This command uses in order to open a file as double-click does. If you want to open a file, named Textfile.txt from your desktop then the code is like below

Example: Invoke-Item C:\Users\User_Nme\Desktop\Textfile.txt

2.    New-Mailbox

This command uses to create new user in Active Directory along with mailbox. This command consist of some mandatory and optional parameters like below

But here we can use the command only supplying these parameters - “Name, Password, UserPrincipalName, OrganizationalUnit, Firstname, LastName, Database and Alias”.

Example: New-Mailbox -UserPrincipalName russel@somedomain.com -Alias Russel -Name RusselCrow -OrganizationalUnit ExampleUnit -Password Some9Pwd -Firstname Russel -LastName Crow -DisplayName "Russel Crow"

3. New-DistributionGroup
 In order to create a group in your organization this command is used. 



Example: New-DistributionGroup -Name "Marketing" -OrganizationalUnit "somedomain.com/users"
-SAMAccountName "Marketing" -Type "Distribution"

4. Add-DistributionGroupMember
Use this command to add a user in a distribution group.


Example: Add-DistributionGroupMember -Identity "Marketing" -Member "Russel Crow"

5. New-Mailcontact

This command allows user to create a new contact of an external address

Example: New-Mailcontact -Name James bond` -ExternalEmailAddress: jamesbond@somedomain.com OrganizationalUnit Admin` -Alias JamesBond

6. Enable-Mailcontact Use this command to enable a contact.

Example: Enable-MailContact -Identity JamesBond -ExternalEmailAddress "jamesbond@somedomain.com"

7. Disable-Mailcontact

This command allows user to make disable a contact

Example: Disable-MailcontactJames Bond

8. Remove-MailContact

To remove a mail contact from active directory this command is used.

Example: Remove-MailContact -Identity ‘somedomain.com/Users/jamesbond’

9. Get-Mailbox

To check mailbox information this command is used.

Example: Get-Mailbox -Identity JamesBond

Also there is other more Cmdlet for Exchange 2010 and we can find out those with the below help command.

10. Get-Help

To get help about any command this command is used. It will show about that command which you are seeking help with its full parameter.

Example: Get-Help New –full

Here it will display all information regarding New. That means all command associated with New verb is shown. Also you can pick any of the displayed command with Get-Help command and it will show all information with parameter.