Currently Browsing: Exchange Server

ActiveSync Error 500 but allowing users to connect mailbox.

Recently I have had a strange growing number of users complaining that they cannot connect any ActiveSync device to our Exchange 2010 servers.

I used http://testexchangeconnectivity.com on one of the accounts that was experiancing the same problem, all the tests returned fine but the last step gave this error:

Attempting the FolderSync command on the Exchange ActiveSync session.
The test of the FolderSync command failed.

IIS returned a error 500,

This made no sense because:
the mailbox was in the same Exchange Organization as me and I could connect many devices to active sync with now problems.
The mailbox had already got 3 current working devices connected to active sync.
Connecting the mailbox to activesync was working fine on the users ipad but just was not returning mail.

After trying a few failed fixes I came across the solution,

open adsi edit, find the user in the you domain, expand the user and remove the object “CN=ExchangeActiveSyncDevices”

Your user should now be able to re-add all existing devices back to exchange and any new devices.

Report This Post

Exchange 2010 OWA – Invalid under scope organization provided error

After moving a company Organization within hosted exchange 2010 users reported this error when trying to edit or remove devices in OWA 2010.

“Invalid under scope organization provided”

Event viewer throws this error out:

Event ID: 4999

MSExchange Common

Watson report about to be sent for process id: 1800, with parameters: E12, c-RTL-AMD64, 14.01.0218.015, ECP, M.E.Data.Directory, M.E.D.D.ScopeSet.ResolveUnderScope, System.ArgumentException, c979, 14.01.0218.011.
ErrorReportingEnabled: False

This was caused by the devices not been updated when I moved the users, to fix the users I made this quick script:

## Organization that is getting the active sync errors
$orgname = "386"
$root = [ADSI]''
$CurrentDN = $root.DistinguishedName
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = [ADSI]"LDAP://localhost:389/OU=$orgname,OU=Microsoft Exchange Hosted Organizations,$CurrentDN"
$objSearcher.Filter = "((objectClass=msExchActiveSyncDevice))"
$colResults = $objSearcher.FindAll()

foreach ($device in $colResults){
	$dn = $device.properties.distinguishedname
	echo "Fixing device $dn"
	$obj = [ADSI]"LDAP://localhost:389/$dn"
	$obj.put("msExchCU", "CN=Configuration,CN=$orgname,CN=ConfigurationUnits,CN=Microsoft Exchange,CN=Services,CN=Configuration,$CurrentDN")
	$obj.put("msExchOURoot", "OU=$orgname,OU=Microsoft Exchange Hosted Organizations,$CurrentDN")
	$obj.setInfo()
}

Report This Post

Segregating address lists based on department within Exchange 2010 hosted / multi-tenant

Some of our customers like the ability to segregate address books based on department within an existing host organization. After doing a bit of reading I found that to achieve this all that is needed is to point the users msExchQueryBaseDN and msExchUseOAB at an address list / book.

I wrote this to segregate 2 departments so they can only see each other in the address book whilst still remaining within the same hosted organization, may be of some use.

## Name of organization you want to edit.
$org = "Company A"

## Grab current Domain
$CurrentDN = $([ADSI]'').DistinguishedName

## the 2 departments we are looking for
$dept1 = "Sales"
$dept2 = "Finance"

## Create new address lists and offline address book for new departments and assign correct recipient filter
New-Addresslist -Name $dept1 -Organization $Org -RecipientFilter {((Alias -ne '$null') -and ((Department -eq 'Sales') -or (CustomAttribute2 -eq 'Distribution')))}
New-Addresslist -Name $dept2 -Organization $Org -RecipientFilter {((Alias -ne '$null') -and (Department -eq 'Finance'))}
New-OfflineAddressBook -Name $dept1 -AddressLists "CN=$dept1,CN=All Address Lists,CN=Address Lists Container,CN=Configuration,CN=$org,CN=ConfigurationUnits,CN=Microsoft Exchange,CN=Services,CN=Configuration,$CurrentDN" -Organization "$org"
New-OfflineAddressBook -Name $dept2 -AddressLists "CN=$dept2,CN=All Address Lists,CN=Address Lists Container,CN=Configuration,CN=$org,CN=ConfigurationUnits,CN=Microsoft Exchange,CN=Services,CN=Configuration,$CurrentDN" -Organization "$org"

## Update address lists and offline address book to build users
Get-AddressList $dept1 -Organization $org | Update-Addresslist
Get-AddressList $dept2 -Organization $org | Update-Addresslist
Get-OfflineAddressBook $dept1 -Organization $org | Update-OfflineAddressBook
Get-OfflineAddressBook $dept2 -Organization $org | Update-OfflineAddressBook

## Find all users in the organization
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = [ADSI]"LDAP://localhost:389/OU=$org,OU=Microsoft Exchange Hosted Organizations,$CurrentDN"
$objSearcher.Filter = "(&(objectCategory=User))"
$colResults = $objSearcher.FindAll()
foreach ($user in $colResults){
	$newdn = $user.properties.distinguishedname
	$userdep = $user.properties.department
	if ($userdep -match "$dept1"){
		echo "Found user in $dept1, changing OWA address list lookup and setting offline address book for outlook users"
		$objUser = [ADSI]"LDAP://$newdn"
		$ObjUser.put("msExchQueryBaseDN", "CN=$dept1,CN=All Address Lists,CN=Address Lists Container,CN=Configuration,CN=$org,CN=ConfigurationUnits,CN=Microsoft Exchange,CN=Services,CN=Configuration,$CurrentDN")
		$objUser.setInfo()
	}
	if ($userdep -match "$dept2"){
		echo "Found user in $dept2, changing OWA address list lookup and setting offline address book for outlook users"
		$objUser = [ADSI]"LDAP://$newdn"
		$ObjUser.put("msExchUseOAB", "CN=$dept2,CN=Offline Address Lists,CN=Address Lists Container,CN=Configuration,CN=$org,CN=ConfigurationUnits,CN=Microsoft Exchange,CN=Services,CN=Configuration,$CurrentDN")
		$ObjUser.put("msExchQueryBaseDN", "CN=$dept2,CN=All Address Lists,CN=Address Lists Container,CN=Configuration,CN=$org,CN=ConfigurationUnits,CN=Microsoft Exchange,CN=Services,CN=Configuration,$CurrentDN")
		$objUser.setInfo()
	}
}

Very simple script feel free to edit and use.

Report This Post

Exchange 2010 An error occurred when you tried to access your mailbox because a server with information about you and your mailbox couldn’t be found.

Upon creating a a mailbox on Exchange 2010 I ended up with this error when trying to logon to OWA,

Request
Url: https://owa.localhost:443/owa/lang.owa
User host address: 127.0.0.1
User: T User (more…)

Report This Post

Report This Blog