Tag Archives: exchange 2010

Change autodiscover URL (EWS URL / OAB URL / ECP URL / Activesync URL) – Exchange 2010

If you want to change Autodiscover / EWS / OAB / OWA / ECP / Activesync Url, this is how it works

Set-WebServicesVirtualDirectory -Identity “SERVERNAME\EWS (Default Web Site)” -InternalUrl https://INTERNALURL/EWS/Exchange.asmx -externalurl https://EXTERNALURL/EWS/Exchange.asmx -BasicAuthentication:$true

Set-AutoDiscoverVirtualDirectory -Identity "SERVERNAME\Autodiscover (Default Web Site)" -internalurl https://INTERNALURL/autodiscover/autodiscover.xml -externalurl https://EXTERNALURL/autodiscover/autodiscover.xml

set-OabVirtualDirectory -identity "SERVERNAME\OAB (Default Web Site)" -internalurl https://INTERNALURL/OAB -externalurl https://EXTERNALURL/OAB

set-EcpVirtualDirectory -identity "SERVERNAME\ecp (Default Web Site)" -internalurl https://INTERNALURL/ecp -externalurl https://EXTERNALURL/ecp

set-OwaVirtualDirectory -identity "SERVERNAME\owa (Default Web Site)" -internalurl https://INTERNALURL/owa -externalurl https://EXTERNALURL/owa

set-ActiveSyncVirtualDirectory  -identity "SERVERNAME\Microsoft-Server-ActiveSync (Default Web Site)" -internalurl https://INTERNALURL/Microsoft-Server-ActiveSync -externalurl https://EXTERNALURL/Microsoft-Server-ActiveSync

Set-ClientAccessServer -Identity "SERVERNAME" –AutoDiscoverServiceInternalUri https://INTERNALURL/autodiscover/autodiscover.xml

Or if this is a single server installation you can do it like this:

get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -InternalUrl https://INTERNALURL/EWS/Exchange.asmx -externalurl https://EXTERNALURL/EWS/Exchange.asmx -BasicAuthentication:$true

get-AutoDiscoverVirtualDirectory | Set-AutoDiscoverVirtualDirectory -internalurl https://INTERNALURL/autodiscover/autodiscover.xml -externalurl https://EXTERNALURL/autodiscover/autodiscover.xml

get-OabVirtualDirectory | set-OabVirtualDirectory -internalurl https://INTERNALURL/OAB -externalurl https://EXTERNALURL/OAB

get-EcpVirtualDirectory | set-EcpVirtualDirectory -internalurl https://INTERNALURL/ecp -externalurl https://EXTERNALURL/ecp

get-OwaVirtualDirectory | set-OwaVirtualDirectory -internalurl https://INTERNALURL/owa -externalurl https://EXTERNALURL/owa

get-ActiveSyncVirtualDirectory | set-ActiveSyncVirtualDirectory  -internalurl https://INTERNALURL/Microsoft-Server-ActiveSync -externalurl https://EXTERNALURL/Microsoft-Server-ActiveSync

get-ClientAccessServer | Set-ClientAccessServer  –AutoDiscoverServiceInternalUri https://INTERNALURL/autodiscover/autodiscover.xml

Lost trust on my Exchange 2010 after revert to a older snapshot

I was returing to an older snapshot of my Exchange servers. But when i want to logon to the Exchange server, it came with “Trust relationship has been lost with domain controller”.

Normally you just rejoin the domain, but this is not a good idea, when there is installed Exchange services on it.

I fix this with netdom.
Logon to the Exchange with a locally logon account.
Start command with Administrator rights
Type: netdom /RESETPWD /server:DOMAINCONTROLLER /UserD:DOMAINNAME\ACCOUNTNAME /PasswordD:PASSWORD OR *

Exchange 2010, powershell full access and send-as permission

To get a CSV file, from you exchange with full access and send as permission, from all you mailboxes run these commands:

Full Access

Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Select Identity,User,@{Name=’Access Rights’;Expression={[string]::join(‘, ‘, $_.AccessRights)}} | Export-Csv -NoTypeInformation c:\mailboxpermissions.csv

Send As

Get-Mailbox | Get-ADPermission | where { ($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Select Identity, User, Deny | Export-CSVc:\sendas.csv

Microsoft Exchange 2010 – Ahsay restore to recovery mailbox database / storage group.

Ahsay have no support for native restore to Exchange recovery group, but here is a workaround of that problems.

First create a recovery storagegroup
New-MailboxDatabase -Recovery -Name RDB1 -Server exch2010 -EdbFilePath “F:\Backup\Restore\Data\rdb1.edb” -LogFolderPath “F:\Backup\Restore\Log”
Where RDB1 is the name of the Recovery database and Exch2010 is the name of the servere where recovery database should be located.

Restore the Exchange 2010 database to a alternative location in ahsay. With both logfiles and the database files, restore it to “F:\Backup\Restore\Data\Mailbox Database.edb” or where you location is.

Then run repair of the restored database.
Eseutil /p “F:\Backup\Restore\Data\Mailbox Database.edb”

Then mount the database
Mount-Database -Identity ‘Mailbox Database’

Example restore a mailbox to a Restore mailbox in the real database.
Restore-Mailbox -Identity ‘mailbox_to_restore_content_to’ -RecoveryDatabase RDB1 -RecoveryMailbox ‘Mailbox_Restore’ -TargetFolder Recovery

This will create a folder name Recovery under mailbox_to_restore_content_to, with the content of Mailbox_Restore

[PS] C:\Recovery20110909>Restore-Mailbox -Identity jvrestore -RecoveryDatabase RDB1 -RecoveryMailbox ‘Jesper Vernegaard’
-TargetFolder Recovery

Roles to be installed before Exchange 2010 SP1

Start powershell and run import-module servermanager

Then run

Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart

Backup of Exchange 2010 database level and document level with Ahsay

Installation of the Ashay Client:

Download the Ahsay Client:
http://eval.ahsay.com/obs/download/obm-win.exe

After the installation please apply the latest hotfix.
http://download.ahsay.com/support/hot-fixes/55/obm-win-hotfix.zip

Put the content of the hotfix into the folder: c:\program files\ahsayobm\

Disable Continous Backup services

Database level:
To backup the database level, just select Exchange Database Level, and choise Exchange 2010

Document level:
First install Microsoft Exchange Server MAPI Client and Collaboration Data Objects, download it from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1004
When you want to create a document level backup of Exchange 2007 or 2010 in ahsay you first need to run ahsay in 32bit java environment.
Please run c:\Program Files\AhsayOBM\bin\RunOBC32.bat
This will startup the Ahsay client in 32bit java environment. Then create a new backup job and set type to: MS Exchange Mail Level Backup, and give it a name.
If you get this: “DOMAIN\Administrator” might have insufficient permissions to the mailbox, please follow this steps.
a. Please first check that the Online Backup Scheduler is running under an acount that have access to the Exchange Mailbox, the “Local System” account does not have access to this, change it for to an account that have access, i use administrator.
1. Open [Control Panel] -> [Administrative Tools] -> [Services] -> [Online Backup Scheduler] -> [Log on]
2. Select the [This Account] option
3. Enter the Login Credentials
4. Restart the [Online Backup Scheduler] service
b. Please check that the account your have use is mail enabled. (Has an mailbox enable, and is not hidden from the default address book).
c. If the suggestions above cannot resolve the issue, please also verify if the MAPI profile used by OBM is configured properly. You could do so by following the instructions below:
1. Download the MAPI editor (MfcMapi.exe)
2. Open the MAPI editor
3. Select [Profile], and then [Show Profile]
4. Right click on the [Online Backup Manager] profile
5. Select [Open Profile]
6. Right click on the [Microsoft Exchange Server] entry and then select [Configure Service]
7. Enter the correct information, and then [Apply]
8. Once done, please restart the OBM client

Now select witch mailbox and public folders you want to backup with document level backup, and click next
Select the scheduled you want to run, and click next
Select the encrypting and click ok, now the backup is setup, and you can close this window, remember to click Save settings.

If you ran into any problems, look here:
If you get this: “DOMAIN\Administrator” might have insufficient permissions to the mailbox, please follow this steps.

a. Please first check that the Online Backup Scheduler is running under an acount that have access to the Exchange Mailbox, the “Local System” account does not have access to this, change it for to an account that have access, i use administrator.

Open [Control Panel] -> [Administrative Tools] -> [Services] -> [Online Backup Scheduler] -> [Log on]
Select the [This Account] option
Enter the Login Credentials
Restart the [Online Backup Scheduler] service

b. Please check that the account your have use is mail enabled. (Has an mailbox enable, and is not hidden from the default address book).
c. If the suggestions above cannot resolve the issue, please also verify if the MAPI profile used by OBM is configured properly. You could do so by following the instructions below:
1. Download the MAPI editor (MfcMapi.exe)
2. Open the MAPI editor
3. Select [Profile], and then [Show Profile]
4. Right click on the [Online Backup Manager] profile
5. Select [Open Profile]
6. Right click on the [Microsoft Exchange Server] entry and then select [Configure Service]
7. Enter the correct information, and then [Apply]
8. Once done, please restart the OBM client