Monthly Archives: April 2009

Change Mailbox Display Name to Format “Lastname, Firstname”

Applies to: Exchange Server 2007

By default the Display Name of Exchange Mailboxes is in the format of “Firstname Lastname”. To change this for an existing mailbox to “Lastname, Firstname”, use the Exchange Management Shell command below.

Get-Mailbox “User Name” | Get-User | ?{ $_.Lastname -ne $null } | %{ $dispName=$_.LastName + “, ” + $_.FirstName ; set-mailbox $_.SamAccountName -Displayname $dispName }

In case you want to revert back to the format “Firstname Lastname”, here’s the command for that.

Get-Mailbox “User Name” | Get-User | ?{ $_.Lastname -ne $null } | %{ $dispName=$_.FirstName + ” ” + $_.LastName ; set-mailbox $_.SamAccountName -Displayname $dispName }

Change Mailbox Type of an existing Mailbox

Applies to: Exchange Server 2007

You might have encountered the case where you (or someone else) created a regular mailbox, that should have been a shared mailbox? There is help.

The type of mailbox can easily be changed by using the appropriate Exchange Management Shell command from below.

Regular Mailbox
Set-Mailbox -Identity {Mailbox Name} -Type Regular

Room Mailbox
Set-Mailbox -Identity {Mailbox Name} -Type Room

Equipment Mailbox
Set-Mailbox -Identity {Mailbox Name} -Type Equipment

Shared Mailbox
Set-Mailbox -Identity {Mailbox Name} -Type Shared

Note: There might be further setting changes required in addition to above commands, i.e. for a shared mailbox: granting people access, for room mailboxes: setup of auto-accept features etc.

Repair Corrupted Outlook PST File

Applies to: Outlook (2003 and 2007)

If you can’t open your Personal Folders file (.pst) or you suspect that your .pst data file is corrupt, you can use the Inbox Repair tool (Scanpst.exe), to diagnose and repair errors in the file. Instructions for both Outlook 2003 and Outlook 2007 are given below.

Outlook 2003

  • Close Outlook if it’s running
  • Open folder “drive:Program FilesCommon FilesSystemMSMAPILocaleID”
    (drive is normally the C drive, and LocaleID is the locale identifier (LCID) for the installation of Microsoft Office. The LCID for English – United States is 1033)
  • Double-click Scanpst.exe
  • Select the PST file to scan by using the “Browse” button
  • Click Start
    When the scanning is completed, and if errors were found, you will be prompted to start the repair process
  • If required, change the location of the backup file in the Backup File Box
  • Click Repair
  • Start Outlook using the profile that contains the .pst file that you tried to repair
  • The Lost and Found folder contains folders and items that the Inbox Repair tool recovered

Outlook 2007

  • Close Outlook if it’s running
  • Open folder “drive:Program FilesMicrosoft OfficeOffice12″
    (drive is normally the C drive)
  • Double-click Scanpst.exe
  • Select the PST file to scan by using the “Browse” button
  • Click Start
    When the process is completed, the results will be displayed
  • If required, change the location of the backup file in the Backup File Box
  • Click Repair
  • Start Outlook using the profile that contains the .pst file that you tried to repair
  • The Lost and Found folder contains folders and items that the Inbox Repair tool recovered

Recreate Exchange IIS Virtual Directories

Applies to: IIS, Exchange Server 2007

If you’re in need to recreate the IIS virtual directories of Exchange Server, below commands will do exactly that. Launch the Exchange Management Shell on the CAS server and enter below commands as needed.

  • “Exchange (Default Web Site)”
    Remove-OwaVirtualDirectory “exchange (Default Web Site)”

    New-OwaVirtualDirectory “exchange” -OwaVersion Exchange2003or2000 -VirtualDirectoryType Mailboxes -WebSiteName “Default Web Site”

  • “Exchweb (Default Web Site)”
    Remove-OwaVirtualDirectory “exchweb (default web site)”

    New-OwaVirtualDirectory “exchweb” -OwaVersion Exchange2003or2000 -VirtualDirectoryType Exchweb -WebSiteName “Default Web Site”

  • “OWA (Default Web Site)”
    Remove-OwaVirtualDirectory “owa (default web site)”

    New-OwaVirtualDirectory -name “owa” -OwaVersion Exchange2007 -WebSiteName”Default Web Site”

  • “Public (Default Web Site)”
    Remove-OwaVirtualDirectory “public (default web site)”

    New-OwaVirtualDirectory “public” -OwaVersion Exchange2003or2000 -VirtualDirectoryType PublicFolders -WebSiteName “Default Web Site”

Final step: Restart the IIS service and WWW Publishing service on the server.