Monday, November 30, 2009

Update all address lists in Exchange 2007

We are very close to getting the Last Exchange Server 2003 decommissioned. Long process, will write about it when I get some time.

I used the this link to get some info about upgrading the Address Lists to Exchange 2007, finally ended up using PowerGUI with Exchange PowerPack to perform the actual task. Anyways after the filters were corrected for each department by using

(Department –eq ‘Department Name’ -and RecipientType -eq 'UserMailbox')

Users were still seeing the old entries in the address lists in outlook because the lists had to be update or refreshed in Exchange 2007.  To update one address list only you can use the following cmdlet in EMS

Update-AddressList -identity ‘list name’

To update all address lists use the following

Get-AddressList | Update-AddressList

Love the power of Exchange Management Shell and PowerShell!!!

Sunday, November 29, 2009

BlackBerry Server MAPI Connectivity Issue


When trying to resolve the Exchange server profile on BlackBerry server following error appears

“The name could not be resolved. Network Problems are preventing connection to the Microsoft Exchange Server computer. Contact your system administrator if this condition persists.”


This could be caused due to many reasons, but one that I would check the last (not even that) caused it on our BlackBerry server.  When BlackBerry server is installed and for the first time MAPI connectivity is established through Exchange Collaboration Data Object, it uses a Global Catalog server to authenticate. If GC role is seized from that server, above issue occurs.

To fix it I had to enable the GC role again on the same server and it started to work fine. I tried a few registry tweaks to get the BlackBerry server to find nearest GC with no success. Will try to find a better fix, meanwhile if you have any suggestions please comment.

User with no mailbox appears in Global Address List (GAL)


This might happen when you copy a user account in Active Directory. If the template account had a mailbox and the newly created account doesn’t have a mailbox.

Active Directory still copies the Exchange Attributes and that is why the newly created account which doesn’t have a mailbox or email address appears in the Global Address List.


To fix it : -

  • Open ADSI Edit
  • Look for the account and open its properties
  • In the Attribute Editor find showInAddressBook
  • Click Edit and remove all entries.


Friday, November 27, 2009

Uninstall Software From Remote Workstations

To have the ability to uninstall a package/program on a remote computer can be very useful for Systems Administrators and Helpdesk. Following is how you can accomplish it. You can write a batch file that can uninstall a certain software from multiple computers. 

It will require three things.

  1. MsiZap.exe
  2. PSTools – psexec.exe
  3. GUID of the software you need to uninstall

1. –> Microsoft has a tool called MsiZap.exe, for details check the following link

To acquire this tool download Windows Installer Cleanup and open it with 7zip. MsiZap has two versions MsiZapA.exe (for use in Windows 95, Windows 98 and Windows ME), and MsiZapU.exe (for use in Windows NT, Windows 2000, Windows XP, and Windows Server 2003). Extract the one you need and rename it to MsiZap.exe.

2. –> I use PSTools regularly, you can download it and extract it in “%windir%\System32” so it can be used in command prompt anywhere.

3. –> Okay now we have all the tools we need, but we still need the GUID. To find that you can create a batch file with the following command

for /f "tokens=7 delims=\" %%a in ('reg query hklm\software\microsoft\windows\currentversion\uninstall ^| FIND "{"') do for /f "tokens=2,*" %%c in ('reg query hklm\software\microsoft\windows\currentversion\uninstall\%%a ^| find /i "DisplayName"') do echo %%d,%%a>>c:\GUIDProgsList.txt

--> Now run this batch file using psexec on a remote computer

psexce –cds \\computername “path\batchfile.bat”

you will have GUID for all installed software appended to a file called GUIDProgsList.txt on the C drive of the remote computer.  You can also get this list by going to the following registry manually.


Uninstalling a program remotely

If you have followed the above steps correctly then all you need is to run the following command.

psexec.exe -cd \\computername "path\MsiZap.exe" TW {GUID for the Program to be removed}

Following is an example of removing 7zip from a computer name nyclient01.

psexec.exe -cd \\nyclient01 "path\MsiZap.exe" TW {23170F69-40C1-2701-0457-000001000000}


Word of caution: – MsiZap is powerful commandline tool, use carefully. Always test first.