Archive for March 2011

How to Recreate all Virtual Directories for Exchange 2007


Here you will find all commands what would help you to recreate all Virtual Directories for Exchange 2007. You can also use just a few of them. But never delete or create it in IIS. This has to be done under Exchange Management Shell

First you shall write down the information what you will get (for example: if it "Default Web Site" or "SBS Web Applications" and if they have the information, what InternalURL or External URL is configured):

- Open Exchange Management Shell with elevated permission
- Run the following commands:

Get-AutodiscoverVirtualDirectory
Get-OABVirtualDirectory
Get-OWAVirtualDirectory
Get-WebServicesVirtualDirectory
Get-ActiveSyncVirtualDirectory
Get-UMVirtualDirectory

Then you can remove the Virtual Directories but change the ####### to the information you got earlier

Remove-OWAVirtualDirectory -Identity "Owa (#######)" -Confirm:$false
Remove-OWAVirtualDirectory -Identity "Exadmin (#######)" -Confirm:$false
Remove-OWAVirtualDirectory -Identity "Exchange (#######)" -Confirm:$false
Remove-OWAVirtualDirectory -Identity "Exchweb (#######)" -Confirm:$false
Remove-OWAVirtualDirectory -Identity "Public (#######)" -Confirm:$false
Remove-WebServicesVirtualDirectory -Identity "EWS (#######)" -Confirm:$false
Remove-ActiveSyncVirtualDirectory -Identity "Microsoft-Server-ActiveSync (#######)" -Confirm:$false
Remove-OabVirtualDirectory -Identity "OAB (#######)" -Force:$true -Confirm:$false
Remove-UMVirtualDirectory -Identity "UnifiedMessaging (#######)" -Confirm:$false
Remove-AutodiscoverVirtualDirectory -Identity "Autodiscover (#######)" -Confirm:$false

To verify that the directories have been removed, run the following commands. You should receive no output:

Get-AutodiscoverVirtualDirectory
Get-OABVirtualDirectory
Get-OWAVirtualDirectory
Get-WebServicesVirtualDirectory
Get-ActiveSyncVirtualDirectory
Get-UMVirtualDirectory

To properly create these virtual directories, run the following commands (Please keep the information what you got earlier for ####### and change it here to):

- Open Exchange Management Shell with elevated permission
- Run the following commands:

New-OWAVirtualDirectory -WebsiteName "#######" -OwaVersion "Exchange2007"
-ExternalAuthenticationMethods Fba

Set-OWAVirtualDirectory -InternalUrl "https://INTERNAL_FQDN_OF_EXCHANGE/owa/"
-ClientAuthCleanupLevel "Low" -LogonFormat "UserName" -DefaultDomain “NetBiosDomainName”
-Identity "Owa (#######)"

New-OWAVirtualDirectory -WebsiteName "#######" -OwaVersion "Exchange2003or2000"
-VirtualDirectoryType "Exadmin" -ExternalAuthenticationMethods Fba

New-OWAVirtualDirectory -WebsiteName "#######" -OwaVersion "Exchange2003or2000"
-VirtualDirectoryType "Mailboxes" -ExternalAuthenticationMethods Fba

New-OWAVirtualDirectory -WebsiteName "#######" -OwaVersion "Exchange2003or2000"
-VirtualDirectoryType "Exchweb" -ExternalAuthenticationMethods Fba

New-OWAVirtualDirectory -WebsiteName "#######" -OwaVersion "Exchange2003or2000"
-VirtualDirectoryType "PublicFolders" -ExternalAuthenticationMethods Fba

New-WebServicesVirtualDirectory -WebsiteName "#######"
-InternalUrl "https://Internal_FQDN_OF_EXCHANGE/EWS/Exchange.asmx" -basicauthentication 1
-windowsauthentication 1

New-ActiveSyncVirtualDirectory -WebsiteName "#######"
-InternalUrl "https://Internal_FQDN_OF_EXCHANGE/Microsoft-Server-ActiveSync"
-ExternalAuthenticationMethods Basic -InternalAuthenticationMethods Basic

New-OabVirtualDirectory -WebsiteName "#######" -InternalUrl "https://INTERNAL_FQDN_OF_EXCHANGE/OAB"

Set-OabVirtualDirectory -PollInterval "30" -Identity "oab (#######)"

New-UMVirtualDirectory -WebsiteName "#######" -InternalUrl "https://Internal_FQDN_OF_EXCHANGE/UnifiedMessaging/Service.asmx"

New-AutodiscoverVirtualDirectory -WebsiteName "#######"
-InternalUrl "https://Internal_FQDN_OF_EXCHANGE/Autodiscover/Autodiscover.xml"
-BasicAuthentication 1 -WindowsAuthentication 1

Set-ClientAccessServer -Identity “Servername” -AutoDiscoverServiceInternalUri "https://Internal_FQDN_OF_EXCHANGE2007/Autodiscover/Autodiscover.xml"

Set-OfflineAddressBook "Default Offline Address Book" -VirtualDirectories "Servername\OAB (#######)" -Versions Version2,Version3,Version4)"

- To check if we were successful in creating the virtual directories correctly type in the commands:

Get-AutodiscoverVirtualDirectory
Get-OABVirtualDirectory
Get-OWAVirtualDirectory
Get-WebServicesVirtualDirectory
Get-ActiveSyncVirtualDirectory
Get-UMVirtualDirectory

* Keep in mind if you run -
New-ActiveSyncVirtualDirectory
New-OabVirtualDirectory
New-OWAVirtualDirectory
It will create the Virtual Directories if you are running single server in the environment.

BlackBerry (BIS) users not working after upgrading Exchange Server 2007 SP2 to SP3

Hi All,

I got a chance to work on one interesting issue last week.
The client upgraded his Exchange Server 2007 SP2 to SP3. After upgrading it to SP3 everything was working as it should be, except all there BlackBerry (BlackBerry Internet Service) were not getting Synced and they were getting the below message when they were entering the password.


I reset the password in AD and tried it but they were not working. I created the new mailbox and tried with it but even the new Mailbox is also getting the same error message.

One interesting think I found that when I Enabled the Windows Authentication on OWA Virtual Directory it worked fine for one day but it failed next day
By default Windows Authentication on OWA Virtual Directory is Disabled.

But at the same time when users are using OWA they are able to access the mails.
First i thought that it couldn't be OWA Virtual Directory, but after doing some research found that the problem is with OWA Virtual Directory.

Recreating the OWA Virtual Directory resolved the issue
New-OwaVirtualDirectory -name "owa" -OwaVersion Exchange2007 -WebSiteName "Default Web Site" –InternalURL https://internalURL/owa -ExternalURL https://externalURL/owa

Issue Resolved :)

Cheers,
-Gulab

Mac Outlook 2011 clients getting bad password prompt in every 15 to 20 minutes

I worked with one of the client last week, they had one strange issue with all of there Mac 2011 outlook clients.

As per the client Outlook 2011 started getting the prompt since last few days and prior to this they were working fine.

They had only three Mac Clients and the same mailbox was working fine when using Outlook 2007 and OWA without any issues.

Environment:
Windows Server 2008 SP2
Exchange Server 2007 SP2 with latest Rollup Updates.

We recreated the profile and it worked for around 30 minutes and failed again with the error above error message.
As Outlook and OWA was working fine correctly i didn't thought of that it could be anything else. Moved the mailbox into another Mailbox Database and checked the issue, and guess what it worked fine for another 30 minute and got the same popup again.
If i click on No and reopen the client than it works fine for sometime and give the same error message.
We had total three outlook 2011 clients on Mac and rest of them were using Outlook 2007.

Removed the EWS VirtualDirectory and recreated the EWS VirtualDirectory New-WebServicesVirtualDirectory and the issue got resolved.

Cheers,
-Gulab

EXCHANGE RANGER