Tuesday, February 14, 2012

TOP 10: Exchange Server 2010 PowerShell Commands

Here you will find a collection of the most commonly used commands I run in Exchange 2010. Enjoy!

1. Check Database Availability Group Replication Status
In some cases you may have many copies of Exchange 2010 databases and you want to view the status of them all. This command will perform that task for you but also show you a very important characteristic such as the content index state.


2. Fix a Failed Content Index
In rare cases you may notice the content index has failed. Activating a database copy with a failed content index requires additional guidance but to fix the problem beforehand, run the following.

Update-MailboxDatabaseCopy -Identity [id] -CatalogOnly

3. Move a Mailbox in a Batch
There may be cases where you need to keep track of mailbox moves both those which are in progress and to clear them afterward.

New-MoveRequest -Identity [id] -BatchName

4. Check Move Progress
The following command simply gets all the move requests and their statistics.

Get-MoveRequest | Get-MoveRequestStatistics

4. Clear a Move Request
In order to move a mailbox after a move request has completed or failed, you need to remove the request which can be done in bulk, individually, or by a batch name.

Get-MoveRequest | Remove-MoveRequest

or to remove a batch of requests already labeled...

Get-MoveRequest -BatchName [name] | Remove-MoveRequest

5. Determine Unified Messaging Enablement of a User
To check if a user is enabled for Unified Messaging, run the following.

Get-Mailbox | fl UME*

6. View Queues of all Hub Transport Servers
In some cases you may want to quickly view the queue status of all HT servers to determine if you have significant blockage along the transport pipeline.

Get-TransportServer | Get-Queue

7. Determine Active Calls on a UM Server
I find this one helpful as you can quickly see if a server is in use before performing a UM service reset or else use it for troubleshooting to see the status of a test call.

Get-UmServer | Get-UMActiveCalls

8. Determine Exchange Server 2010 Service Status
This command is helpful in quickly seeing which services are running particularly after a reboot.

Get-Service | Where {$_.DisplayName -Like "Microsoft Exchange*"}

9. Get Mailbox Sizes and Sort by Size

Get-Mailbox | Get-MailboxStatistics | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto

10. Check Autodiscover Settings

Get-WebServicesVirtualDirectory | fl InternalUrl,ExternalUrl
Get-EcpVirtualDirectory | fl InternalUrl,ExternalUrl
Get-OwaVirtualDirectory | fl InternalUrl,ExternalUrl
Get-OabVirtualDirectory | fl InternalUrl,ExternalUrl

Get-ClientAccessServer | fl AutoDiscoverServiceInternalUri

Monday, February 13, 2012

HOW TO: Configure Lync Server 2010 and Tenor Analog Gateway

This post details the most concise steps I can articulate when configuring a Tenor voice gateway with Lync Server 2010.

STEP 1: Connect the gateway
After unboxing the unit you want to plug in the power and connect both a console and network cable. The device will seek out a DHCP server to obtain an address by default. You can search through your DHCP server's lease list by sorting the MAC address column and attempting to locate the Tenor's address or proceed with the next step.

STEP 2: Find the gateway
Download the Tenor Config Manager software by registering at NET's web site and install it on your PC used for configuring the device. The Tenor Config Manager software has an automatic detection feature which will find the gateway if it was able to obtain an IP address from your DHCP server. If you are unable to find the gateway using the software, use HyperTerminal or Putty to connect via COM port to the device to determine or set it's IP address.

NOTE: The default COM port settings are 38400/8/N/1/No flow control.

STEP 3: Update the firmware

1. Locate the latest firmware (it will come down as a zip file) from the NET web site and download it to your C: drive.
2. Unzip the contents of the firmware to a directory such as "c:\tenor-8port-firmware".
3. Click the START menu, click RUN, and type "cmd" and hit Enter.
4. Type "c:" and then Enter, then "cd \" and Enter, then "cd c:\tenor-8port-firmware" and Enter.
5. Type "ftp " and Enter. Type the username and password (default is admin/admin).
6. Type "bin" and Enter.
7. Type "hash" and Enter.
8. Type "prompt" and Enter.
9. Type "mput *.*" and Enter. This will copy all the unzipped files from the directory you started in which should have been "c:\tenor-8port-firmware". This will take a few minutes to complete.
10. Once complete type "bye" and Enter.
11. You now need to reboot the device. Do this with the Tenor Config Manager software or else Telnet into the device using the IP address you've learned and type "debug reboot".

STEP 4: Configure settings using the Wizard

1. Using Tenor Config Manager, locate the device using autodiscover and connect to it with the username and password (default is admin/admin). Alternatively if you know the IP address, you can use it to connect with the software.
2. The Config Manager software will prompt you to start by using the Wizard. This is the best choice as it walks you through the basic settings needed and only a few more manual settings will remain.
3. Click the Next button to start the Wizard.
4. Choose to "Specify a static IP" and click Next.
5. Set the IP address, Subnet Mask, and your Default Gateway. Leave the External NAT IP blank (all zero) and click Next.
6. Accept the default to "Manually Configure DNS Server Addresses" and click Next.
7. Enter the IP addresses of your DNS servers and click Next.
8. Click Next to continue with the dial plan settings.
9. Click Next to accept the default of "none" for the country.
10. Click Next to accept the default progress tone of "0-USA/Canada".
11. Click Next to begin the phone port configuration.
12. Click Next to accept the defaults of "Loop start/Forward Disconnect" and "FSK".
13. Enter a phone number for each port and click the Save button then the Done button.
14. Review your phone numbers for each port configured and click Next if you're satisfied with the changes.
15. Click Next to begin the VoIP Routing configuration.
16. Choose the default option of "SIP Only" and click Next.
17. Type the FQDN or IP address of your Mediation Server or pool name.
18. Modify the TCP port number to match the port used in your Lync topology. The default is not 5060 so be sure to set this correctly.
19. Click Next and Next again to bypass the registration page.
20. Click Next to begin the Idle Channel Configuration and choose "No" for disabling Phone/PBX-side channels then click Next.
21. Click Next then click Accept to submit all changes and reboot the gateway.

STEP 5: Configure Lync Server 2010 specific settings

1. Using the Tenor Config Manager software, connect to the Tenor device.
2. Click the Advanced Explore tab.
3. Expand the VoIP Configuration section, then expand the SIP Signaling Groups section and click on the SIP Signaling Group-1.
4. Turn off "Include Quintum Header" and "Allow Only Proxy Calls" then click the Confirm/OK button
5. Click the Advanced tab then change the Transport type to "TCP" and turn on the "Early Media Ring Tone" then click the Confirm/OK button.
5. Expand the Voice Codecs section and click on Voice Codec-1 then choose "G.711 Mu-law @ 64Kbps", then click the Confirm/OK button.
6. Expand the IP Routing Groups section, click on the IP Routing Group-default section, click the Fax/Qos tab, and change the "Fax Relay" and "Fax Modem Coding" both to "G.711 Mu-law".
7. Click the red/blue toolbar icon to submit all changes to the gateway.