Pages

Monday, February 22, 2010

Enable RPC/HTTP (Outlook Anywhere) in Exchange 2007 on single user

Here is the quick command that you can use to view the properties of an Exchange 2007 user.

Get-CASMailbox -Identity jsmith fl more

You can use the following cmdlet to set RPC over HTTPs (Outlook Anywhere).

Get-CASMailbox -Identity jsmith Set-CASMailbox -MAPIBlockOutlookRpcHttp:$false

Moving Mailboxes - Exchange 2007 SP1

Something very interesting happened the other day when I decided to use the Move-Mailbox cmdlet in Exchange 2007 to move about 350 mailboxes from one storage group to another. I ran the following command first:

Get-Mailbox -Database mailsrvr\SG07\SG07-DB01 -ResultSize unlimited Move-Mailbox -TargetDatabase mailsrvr\SG01\SG01-DB01 -MaxThreads 15 -PreserveMailboxSizeLimit -ReportFile C:\MoveResultAll.txt

It just took forever to move mailboxes. Note that I used 15 threads to move mailboxes thinking that it would move 15 mailboxes at once. The size of mailboxes on average was 150-200 MB. I was expecting this to finish within 3-4 hours. I finally decided to cancel the task and started to investigate as to why it took this long for these to move. I finally came to the conclusion that it was because some the large mailboxes took forever to move and caused bottle neck for other many smaller mailboxes. But I was kind of surprised because my own mailbox is nearly 800 MB and it took 10 minutes to move. I mean we have a pretty heavy duty Exchange server. So next day I tried the following script to larger mailboxes will be moved first and then all smaller ones.

Get-MailboxStatistics -Database mailsrvr\SG08\SG08-DB01 Sort-Object TotalItemSize Move-Mailbox -TargetDatabase mailsrvr\SG10\SG10-DB01 -MaxThreads 30 -PreserveMailboxSizeLimit -ReportFile C:\MoveResult_All.txt

It still took forever and after 2 hours it had moved only 15 mailboxes. Note that this time I even used 30 threads to move mailboxes.

I finally decided to move mailboxes using Move mailbox wizard. You an use up to five mailboxes at a time with default of 5 threads and with 10 wizard windows open.

This turned out to be very fast as I was move 50 mailboxes on an average of 30 minutes.

I am surprised that there was too much delay when using PowerShell to move mailboxes on the same server on Exchange 2007. I used same commands to move mailboxes from Exchange 2000 to Exchange 2007 during the migration. However, there I was using multiple shell window to run Move-Mailbox cmdlet using different OUs.

Wednesday, February 10, 2010

How to search items in a list against another list in Excel?

To search a list against another list follow these steps to find different values

1. Select the range or list which contains values to be compared
2. Click Format --> Conditional Format
3. Select Formula Is from drop down
4. Enter this formula COUNTIF($Range,$Cell), where $Range is the list which will be compared against and $Cell is the cell where list in #1 starts. i.e. $Range = $A1:$B2 and $Cell = C2
5. Click Format Style and select formatting such as pattern or font color.
6. Click Ok
7. Result will show cells with new formatting selected in last step.

How to remove empty rows in Excel?

To remove empty rows in Excel:

1. Simply highlight and select all rows
2. Press Ctrl + G, then click Special button
3. Click Blanks radio button, Click Ok
4. Go to Edit --> Delete or right click and delete

Monday, February 8, 2010

SSL Traffic and Microsoft ISA 2006 Server

Microsoft's ISA 2006 Firewall/Proxy will not allow SSL traffic on any other port except port 5003. Well actually, it will allow the HTTPS request to go out but will not allow response back with message of "Unidentified IP Traffic". This applies to all of the following:

Microsoft Internet Security and Acceleration Server 2004 Standard Edition
Microsoft Internet Security and Acceleration Server 2000 Standard Edition
Microsoft Windows Small Business Server 2003 Premium Edition
Microsoft Internet Security and Acceleration Server 2006 Enterprise Edition
Microsoft Internet Security and Acceleration Server 2006 Standard Edition
Windows Essential Business Server 2008 Standard
Microsoft Forefront Threat Management Gateway, Medium Business Edition

You can use the following KB to use vbscript to add more ports on ISA.
http://support.microsoft.com/kb/283284

Sunday, February 7, 2010

Use CLI to add new port groups in VMware ESX 3.5 or vSphere

If you need to add multiple port groups at once on a single vSwitch or multiple virtual switches, you can use the following commands,
esxcfg-vswitch vSwitch2 -A VMs-403
esxcfg-vswitch vSwitch2 -p VMs-403 -v 403

esxcfg-vswitch vSwitch2 -A VMs-405
esxcfg-vswitch vSwitch2 -p VMs-405 -v 405

esxcfg-vswitch vSwitch2 -A VMs-409
esxcfg-vswitch vSwitch2 -p VMs-409 -v 409


where,

vSwitch2 - Name of your virtual switch
-A - To add a new port group to the virtual switch
-p - VLAN Id of your port group

Friday, February 5, 2010

Vmkernel Default Gateway in ESX

In ESX, you can only have one default gateway for any number of vmkernel networks.

Here is an example output from host that has 2 iSCSI vmkernel networks and 1 Vmotion:

[root@host01 ~]# esxcfg-route -l
VMkernel Routes:
Network Netmask Gateway
192.168.113.0 255.255.255.0 Local Subnet
192.168.115.0 255.255.255.0 Local Subnet
192.168.116.0 255.255.255.0 Local Subnet
default 0.0.0.0 192.168.113.1

Use man UNIX command to see all esxcfg commands in ESX / vSphere

You can use following commands to display all esxcfg commands and then look up help to see what they are for.

Here is the syntax

> man -k esxcfg

esxcfg-advcfg (8) - VMware ESX Advanced Configuration Option Tool
esxcfg-auth (8) - VMware ESX Network Management Utility
esxcfg-configcheck (8) - VMware ESX Config Check Tool
esxcfg-dumppart (8) - VMware ESX 4.0 diagnostic partition configuration tool
esxcfg-firewall (8) - VMware ESX Firewall Configuration Tool
esxcfg-hwiscsi (8) - VMware ESX Qlogic iSCSI configuration Tool
esxcfg-info (8) - VMware ESX Info tool
esxcfg-module (8) - VMware ESX Advanced Configuration Option Tool
esxcfg-mpath (8) - VMware ESX multipathing information
esxcfg-nas (8) - VMware ESX NAS configuration tool
esxcfg-nics (8) - VMware ESX Physical NIC information
esxcfg-rescan (8) - VMware ESX scsi rescan tool
esxcfg-resgrp (8) - VMware ESX resource group manipulation
esxcfg-route (8) - VMware ESX VMkernel IP stack default route Management Tool
esxcfg-swiscsi (8) - VMware ESX Software iSCSI configuration Tool
esxcfg-vmhbadevs [esxcfg-scsidevs] (8) - VMware ESX SCSI device tool
esxcfg-vmknic (8) - VMware ESX VMkernel NIC configuration Tool
esxcfg-volume (8) - VMware ESX Volume Management tool
esxcfg-vswif (8) - VMware ESX Service Console NIC configuration Tool
esxcfg-vswitch (8) - VMware ESX Virtual Switch Configuration tool

Display routing table on ESX / Linux

Today, I learned a new Linux command from a co-worker (Thnx Ludhi) which is very useful during troubleshooting. I probably had run it myself in the past but since I am not hardcore UNIX person, I don't remember all the commands that are out there.

To display all routes on ESX / Linux or I guess on any other Unix system just type:

>netstat -rn

Thursday, February 4, 2010

Software iSCSI Rescan HBAs Commands in vSphere (ESX 4)

Here are a few handy commands you may need when troubleshooting vSphere issues and iSCSI.
You can use the following commands to check dead paths, rescan HBAs, and more.

To see the last part of vmkernel log: less /var/log/vmkernel

List all paths with details: esxcfg-mpath -l

List all vSwitches and Port Groups: esxcfg-vswif -l

List all devices with corresponding paths:
esxcfg-mpath -b
Rescan a particular HBA:
esxcfg-rescan vmhba33
Ping the target:
vmkping 1.1.1.1
Get dead paths: esxcfg-mpath -l grep -i dead

Report information on fist volume:
vdf -h