Exchange 2013 Reinstall/Repair

Is there a way to reinstall or repair exchange 2013 without losing everything?

One of our engineers installed direct access on a customers server trying to get VPNs setup, however since he installed it, then uninstalled it the exchange is down, accessing /ecp and /owa shows 404 errors, can I do a full repair or a reinstall without losing everything or doing everything from scratch?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AmitIT ArchitectCommented:
Yes, you can recover the server back again. Can you share the design, is it a stand alone or part of DAG? Check my article, which I wrote for 2010.
clivingIOSAuthor Commented:
Its a standalone exchange 2013 server installation with everything on one box - it is in a live environment and everything is down at the moment, I have a backup of the .edb should i just uninstall exchange and reinstall?
MASEE Solution Guide - Technical Dept HeadCommented:
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

clivingIOSAuthor Commented:
That link is assuming that I'm installing exchange on a new server - so surely to follow this instructions using the same WIndows 2012 box I would need to uninstall first?

AmitIT ArchitectCommented:
Don't install or uninstall anything. Answer below question:

1) Is current server up and running? If up, what you see in logs and services section?
2) Do you have Exchange Setup?
3) What level of rights your ID having in current environment. As you need Admin level access to Server.
clivingIOSAuthor Commented:
the current server is up and running, exchange services are all running but nothings working - cant get ecp or owa

I have the exchange setup located on a seperate server drive which I am in the process of copying exchange too.

Thanks for your assistance so far.
clivingIOSAuthor Commented:
By copying exchange too, I meant I am making an additional backup of the .edb and .log files
AmitIT ArchitectCommented:
You can keep the copy, however it is not required. Lets do some basic checks. Run below command and share the result
clivingIOSAuthor Commented:
[PS] C:\Windows\system32>test-servicehealth
Creating a new session for implicit remoting of "Test-ServiceHealth" command...

Role                    : Mailbox Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeDelivery, MSExchangeIS,
                          MSExchangeMailboxAssistants, MSExchangeRepl, MSExchangeRPC, MSExchangeServiceHost,
                          MSExchangeSubmission, MSExchangeThrottling, MSExchangeTransportLogSearch, W3Svc, WinRM}
ServicesNotRunning      : {}

Role                    : Client Access Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeMailboxReplication, MSExchangeRPC,
                          MSExchangeServiceHost, W3Svc, WinRM}
ServicesNotRunning      : {}

Role                    : Unified Messaging Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeServiceHost, MSExchangeUM, W3Svc, WinRM}
ServicesNotRunning      : {}

Role                    : Hub Transport Server Role
RequiredServicesRunning : True
ServicesRunning         : {IISAdmin, MSExchangeADTopology, MSExchangeEdgeSync, MSExchangeServiceHost,
                          MSExchangeTransport, MSExchangeTransportLogSearch, W3Svc, WinRM}
ServicesNotRunning      : {}

[PS] C:\Windows\system32>
AmitIT ArchitectCommented:
Services looks fine. Hence I will not recommend reinstallation. What exactly your engineer did, did he change any setting on IIS? Did you restarted the server? If not restart it.
clivingIOSAuthor Commented:
he installed direct access then uninstalled it, after a server restart nothing works, i cant get on /owa or /ecp links they all say 400 bad request
AmitIT ArchitectCommented:
I suggest you to restart this server and check again. Please check the article related to error you are seeing from MS.

If you have option to open case with MS, go ahead and open it.
clivingIOSAuthor Commented:
I have restarted the server a few times to no avail, I have read and worked through a few articles including the one you mentioned which is why I was looking at repair/reinstall - would that still work using the same server?
AmitIT ArchitectCommented:
I personally will focus on fixing root cause. However, if you want to go with repair option, you can give a try. Remember, it is a recover server exercise. Before you can move forward, check two more items.

1) What happen when you launch outlook? What error you are getting.
2) Test OWA and ecp via, see what error you are seeing.
clivingIOSAuthor Commented:
outlook cannot connect to server, I cant access ecp or owa, the event logs are few and far between and just say service issues, even though the services are fine.

basically the owa and ecp have all went cocked up somewhere along the way and I need to put them all back, It isn't working the usual way so I'm thinking that a full reinstall of exchange will be the best and simplest solution, everything was working up until this morning.

I just dont know how to reinstall exchange on the sa,me box, can I just do a removal and then reinstall it and put the database back in? or will it cock up all my AD etc?

Can i just remove one part of exchange that handles the owa/ecp and reinstall that?


clivingIOSAuthor Commented:
outlook error message: Task 'Microsoft Exchange Server' reported error (0x8004011d): 'The server is not available. Contact your administrator is this condition persists.
AmitIT ArchitectCommented:
It seems something got corrupted on network setting. Are you sure, that tool is removed properly. Can you check services and see if anything related to VPN tool is running.

Next to your question how to reinstall it. In this case, you just need to reset computer account in AD. Join it back to Domain. Then launch cmd in admin mode. Browse to exchange setup bin folder and Run:

Setup /m:RecoverServer /IAcceptExchangeServerLicenseTerms

That will reinstall the Exchange back to normal. Don't need to restore DB. As your server is up, it will be mounted automatically. Make sure you update rollup also, which is currently present on server. Don't install higher or lower version. If you have doubt on version run below command from EMS.
GCM exsetup |%{$_.Fileversioninfo}

However, I still don't think it is Exchange issue, as you are able to launch EMS.
clivingIOSAuthor Commented:
Should i disable all the mailboxes before I uninstall exchange or not? If I uninstall exchange it wont delete the AD users will it?
clivingIOSAuthor Commented:
I understand that but obviously before i install exchange I have to remove the current installation, will that remove all my users from AD?
clivingIOSAuthor Commented:
Also, I know exchange is running and the EMS is fine but all of the IIS information is gone so i'm thinking the quickest way to get it back is to reinstall exchange - I have tried for 7 hours today to get them back other ways with no luck.
AmitIT ArchitectCommented:
No need to disable user or remove Exchange. If you remove Exchange from environment, all user will be gone. That will be nightmare. You need to just use recover command. If you have never done this before, then you need to get MS to help you out.
clivingIOSAuthor Commented:
When I run Setup /m:RecoverServer /IAcceptExchangeServerLicenseTerms I get the message:

C:\Users\administrator\Downloads\cu12>Setup /m:RecoverServer /IAcceptExchang

Welcome to Microsoft Exchange Server 2013 Cumulative Update 12 Unattended Setup
Copying Files...
File copy complete. Setup will now collect additional information needed for
Mailbox role: Transport service
Mailbox role: Client Access service
Mailbox role: Unified Messaging service
Mailbox role: Mailbox service
Management tools
Client Access role: Client Access Front End service
Client Access role: Front End Transport service
The following server roles are already installed: BridgeheadRole,
 ClientAccessRole, MailboxRole, UnifiedMessagingRole, FrontendTransportRole,
 AdminToolsRole, CafeRole.

The Exchange Server setup operation didn't complete. More details can be found
in ExchangeSetup.log located in the <SystemDrive>:\ExchangeSetupLogs folder.
clivingIOSAuthor Commented:
here is the log file:

[09/07/2016 18:07:09.0903] [0] **********************************************
[09/07/2016 18:07:10.0020] [0] Starting Microsoft Exchange Server 2013 Setup
[09/07/2016 18:07:10.0020] [0] **********************************************
[09/07/2016 18:07:10.0022] [0] Local time zone: (UTC+00:00) Dublin, Edinburgh, Lisbon, London.
[09/07/2016 18:07:10.0022] [0] Operating system version: Microsoft Windows NT 6.2.9200.0.
[09/07/2016 18:07:10.0025] [0] Setup version: 15.0.1178.4.
[09/07/2016 18:07:10.0026] [0] Logged on user: EJM\administrator.
[09/07/2016 18:07:10.0173] [0] Command Line Parameter Name='mode', Value='RecoverServer'.
[09/07/2016 18:07:10.0173] [0] Command Line Parameter Name='iacceptexchangeserverlicenseterms', Value=''.
[09/07/2016 18:07:10.0173] [0] Command Line Parameter Name='sourcedir', Value='C:\Users\administrator.EJM\Downloads\cu12'.
[09/07/2016 18:07:10.0357] [0] RuntimeAssembly was started with the following command: '/m:RecoverServer /IAcceptExchangeServerLicenseTerms /sourcedir:C:\Users\administrator.EJM\Downloads\cu12'.
[09/07/2016 18:07:10.0361] [0] The registry key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\v8.0, wasn't found.
[09/07/2016 18:07:10.0361] [0] The registry key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14, wasn't found.
[09/07/2016 18:07:10.0367] [0] Copying Files...
[09/07/2016 18:07:10.0372] [0] Starting copy from C:\Users\administrator.EJM\Downloads\cu12\Setup\ServerRoles\Common to C:\Windows\Temp\ExchangeSetup.
[09/07/2016 18:07:14.0398] [0] Finished copy from C:\Users\administrator.EJM\Downloads\cu12\Setup\ServerRoles\Common to C:\Windows\Temp\ExchangeSetup.
[09/07/2016 18:07:14.0414] [0] File copy complete. Setup will now collect additional information needed for installation.
[09/07/2016 18:07:14.0420] [0] Assembly dll file location is C:\Windows\Temp\ExchangeSetup\Microsoft.Exchange.Setup.Console.dll
[09/07/2016 18:07:19.0606] [0] Setup is choosing the domain controller to use
[09/07/2016 18:07:19.0837] [0] The MSExchangeADTopology has a persisted domain controller: EJMSVR.EJM.local
[09/07/2016 18:07:21.0439] [0] PrepareAD has been run, and has replicated to this domain controller; so setup will use EJMSVR.EJM.local
[09/07/2016 18:07:21.0440] [0] Setup is choosing a global catalog...
[09/07/2016 18:07:21.0487] [0] Setup has chosen the global catalog server EJMSVR.EJM.local.
[09/07/2016 18:07:21.0495] [0] Setup will use the domain controller 'EJMSVR.EJM.local'.
[09/07/2016 18:07:21.0496] [0] Setup will use the global catalog 'EJMSVR.EJM.local'.
[09/07/2016 18:07:21.0498] [0] Exchange configuration container for the organization is 'CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=EJM,DC=local'.
[09/07/2016 18:07:21.0503] [0] Exchange organization container for the organization is 'CN=EJM,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=EJM,DC=local'.
[09/07/2016 18:07:21.0524] [0] Setup will search for an Exchange Server object for the local machine with name 'EJMSVR'.
[09/07/2016 18:07:21.0703] [0] Exchange Server object found : 'CN=EJMSVR,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EJM,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=EJM,DC=local'.
[09/07/2016 18:07:21.0796] [0] The following roles have been unpacked: BridgeheadRole ClientAccessRole MailboxRole UnifiedMessagingRole FrontendTransportRole AdminToolsRole CafeRole
[09/07/2016 18:07:21.0799] [0] The following datacenter roles are unpacked:
[09/07/2016 18:07:21.0803] [0] The following roles are installed: BridgeheadRole ClientAccessRole MailboxRole UnifiedMessagingRole FrontendTransportRole AdminToolsRole CafeRole
[09/07/2016 18:07:21.0807] [0] The local server has some Exchange files installed.
[09/07/2016 18:07:21.0822] [0] Server Name=EJMSVR
[09/07/2016 18:07:21.0840] [0] Setup will use the path 'C:\Users\administrator.EJM\Downloads\cu12' for installing Exchange.
[09/07/2016 18:07:21.0844] [0] Setup will discover the installed roles from server object 'CN=EJMSVR,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=EJM,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=EJM,DC=local'.
[09/07/2016 18:07:21.0845] [0] 'BridgeheadRole' is installed on the server object.
[09/07/2016 18:07:21.0845] [0] 'ClientAccessRole' is installed on the server object.
[09/07/2016 18:07:21.0845] [0] 'MailboxRole' is installed on the server object.
[09/07/2016 18:07:21.0846] [0] 'UnifiedMessagingRole' is installed on the server object.
[09/07/2016 18:07:21.0846] [0] 'CafeRole' is installed on the server object.
[09/07/2016 18:07:21.0846] [0] 'FrontendTransportRole' is installed on the server object.
[09/07/2016 18:07:21.0850] [0] The installation mode is set to: 'DisasterRecovery'.
[09/07/2016 18:07:22.0805] [0] An Exchange organization with name 'EJM' was found in this forest.
[09/07/2016 18:07:22.0807] [0] Active Directory Initialization status : 'True'.
[09/07/2016 18:07:22.0807] [0] Schema Update Required Status : 'False'.
[09/07/2016 18:07:22.0807] [0] Organization Configuration Update Required Status : 'False'.
[09/07/2016 18:07:22.0808] [0] Domain Configuration Update Required Status : 'False'.
[09/07/2016 18:07:22.0809] [0] The locally installed version is 15.0.1178.4.
[09/07/2016 18:07:22.0810] [0] Exchange Installation Directory : 'C:\Program Files\Microsoft\Exchange Server\V15'.
[09/07/2016 18:07:22.0863] [0] Setup will run from path 'C:\Windows\Temp\ExchangeSetup'.
[09/07/2016 18:07:22.0881] [0] DisasterRecoveryModeDataHandler has 14 DataHandlers
[09/07/2016 18:07:22.0882] [0] RootDataHandler has 1 DataHandlers
[09/07/2016 18:07:22.0882] [0]      Languages
[09/07/2016 18:07:22.0882] [0]      Mailbox role: Transport service
[09/07/2016 18:07:22.0882] [0]      Mailbox role: Client Access service
[09/07/2016 18:07:22.0882] [0]      Mailbox role: Unified Messaging service
[09/07/2016 18:07:22.0882] [0]      Mailbox role: Mailbox service
[09/07/2016 18:07:22.0882] [0]      Management tools
[09/07/2016 18:07:22.0882] [0]      Client Access role: Client Access Front End service
[09/07/2016 18:07:22.0882] [0]      Client Access role: Front End Transport service
[09/07/2016 18:07:22.0895] [0] Validating options for the 7 requested roles
[09/07/2016 18:07:22.0896] [0] The server cannot be recovered because Setup has detected that Exchange server roles are already installed.
[09/07/2016 18:07:22.0925] [0] The following server roles are already installed: BridgeheadRole, ClientAccessRole, MailboxRole, UnifiedMessagingRole, FrontendTransportRole, AdminToolsRole, CafeRole.
[09/07/2016 18:07:22.0926] [0] CurrentResult console.ProcessRunInternal:90: 1
[09/07/2016 18:07:22.0929] [0] CurrentResult launcherbase.maincore:90: 1
[09/07/2016 18:07:22.0929] [0] CurrentResult console.startmain:52: 1
[09/07/2016 18:07:22.0930] [0] CurrentResult SetupLauncherHelper.loadassembly:452: 1
[09/07/2016 18:07:22.0930] [0] The Exchange Server setup operation didn't complete.  More details can be found in ExchangeSetup.log located in the <SystemDrive>:\ExchangeSetupLogs folder.
[09/07/2016 18:07:22.0930] [0] CurrentResult 1
[09/07/2016 18:07:22.0930] [0] CurrentResult setupbase.maincore:396: 1
[09/07/2016 18:07:22.0932] [0] End of Setup
[09/07/2016 18:07:22.0932] [0] **********************************************
clivingIOSAuthor Commented:
basically it cant do it because exchange is installed, but if I cant uninstall exchange without wiping out my AD then does that mean I have to get a new server just to reinstall exchange?
AmitIT ArchitectCommented:
Did you reset the Exchange server AD object in AD.
clivingIOSAuthor Commented:
yep, followed the instructions to a T
clivingIOSAuthor Commented:
Just to let you all know, I followed various guides online on how to manually rebuild the iis part of exchnage and also upgraded my exchange to roll up 13 from 12, I got errors for the first 7 tries when installing the update but fixes each one and tried again and 48 hours later the installation worked and everything is up and running.

thanks for your assistance.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clivingIOSAuthor Commented:
I explained what I did to fix the issue.
MASEE Solution Guide - Technical Dept HeadCommented:
Glad to know it is fixed and thanks for sharing the solution.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.