programming4us
programming4us
ENTERPRISE

Managing Exchange Server 2010 : The Exchange Management Shell (part 2) - Remote PowerShell

1/23/2011 12:01:14 PM

4. Remote PowerShell

As I keep saying (I'll stop soon), the Remote Shell is new in Exchange Server 2010, making it possible to connect to an Exchange Server 2010 server at a remote location. The workstation doesn't have to be in the same domain or even have the Exchange Management Tools installed – as long as the proper credentials are used, it will work. With this kind of functionality, it's now as easy to manage your Exchange Servers in another part of the building as your Exchange Server in a datacenter in another part of the country.

When the Exchange Management Shell is opened via Start Menu> All Programs> Exchange Server 2010, the Exchange Management Shell will automatically connect to the Exchange Server 2010 you're logged on to. But using the remote options, it's also possible to connect to a remote Exchange Server at this stage.

To use the Remote Shell, you'll need to log on to a Windows Server 2008 (R2) server or Windows 7 workstation that has the Windows Management Framework installed. The Management Framework consists of PowerShell 2.0 and Windows Remote Management (WinRM) 2.0, and can be downloaded from the Microsoft website: HTTP://TINYURL.COM/POWERSHELL2

Make sure that the workstation (or server) supports remote signed scripts. Due to security constraints, this is disabled by default. You can enable this support by opening a Windows PowerShell command prompt and entering:



The next step is to create a session that will connect to the remote Exchange Server. When the session is created it can be imported into PowerShell:



The PowerShell on the workstation will now connect to the remote Exchange Server using a default SSL connection and, RBAC-permitting, all Exchange cmdlets will be available. It's incredibly easy.

Figure 2. Get Mailbox information on a remote PowerShell session.

To end the remote PowerShell session, just enter the following command:



Admittedly, the above example is from a server that's also a member of the same Active Directory Domain. To connect to a remote Exchange Server 2010 server that's available over the Internet, multiple steps are required. The first step is to create a variable in the PowerShell command prompt that contains the username and password for the remote session:



A pop-up box will appear, requesting a username and password for the remote Exchange environment. Once you've filled in the credentials, the following command will create a new session that will setup a connection to the Exchange environment. The $Credential variable is used to pass the credentials to the Exchange environment, and then the session is imported into PowerShell:



Figure 3. Getting Mailbox information using the Remote PowerShell from an Exchange Server that's somewhere in a datacenter.

NOTE

If you want to connect to a remote Exchange Server 2010 server over the Internet you have to remember to enable Basic authentication on the remote server. Open the Internet Information Services (IIS) Manager on the server, navigate to the Default Website and select the /PowerShell Virtual Directory. In the results pane, under IIS double-click on Authentication. Here you can enable Basic Authentication.

The examples were for the Active Directory Domain Administrator, who automatically has the remote management option enabled. To enable another user for remote management, enter the following command:


Other  
 
video
 
Video tutorials
- How To Install Windows 8

- How To Install Windows Server 2012

- How To Install Windows Server 2012 On VirtualBox

- How To Disable Windows 8 Metro UI

- How To Install Windows Store Apps From Windows 8 Classic Desktop

- How To Disable Windows Update in Windows 8

- How To Disable Windows 8 Metro UI

- How To Add Widgets To Windows 8 Lock Screen

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
programming4us programming4us
programming4us
 
 
programming4us