Link to home
Start Free TrialLog in
Avatar of jenkinst
jenkinst

asked on

Cannot install or remove Exchange 2016

Can not install or remove exchange 2016. I was installing CU12 and the update crashed. I tried to rerun the update but got errors. I followed the suggestions (https://exchangemaster.wordpress.com/2010/08/11/cannot-install-or-uninstall-an-exchange-role-after-a-failed-disaster-recovery-install/)
The server was in a DAG. I removed it from the DAG. Exchange powershell doesn't work on the server.  the error message I get when I run the recover/setup is:

 Error:
The following error was generated when "$error.Clear();
          & $RoleBinPath\ServiceControl.ps1 -Operation:DisableServices -Roles:($RoleRoles.Replace('Role','').Split(',')) -SetupScriptsDirectory:$RoleBinPath;
          & $RoleBinPath\ServiceControl.ps1 -Operation:Stop -Roles:($RoleRoles.Replace('Role','').Split(',')) -IsDatacenter:([bool]$RoleIsDatacenter)
        " was run: "System.Management.Automation.PSInvalidOperationException: Cannot find the Windows PowerShell data file 'ManageScheduledTask.Strings.psd1' in directory 'C:\Program Files\Microsoft\Exchange Server\V15\Bin\en-US\', or in any parent culture directories.".

The en-US directory doen't exist. I scanned the V15 and sub directories for the missing file. I doesn't exist.

Thanks for the help
Avatar of Member_2_3654191
Member_2_3654191
Flag of Germany image

All Exchange scripts are located in the Scripts folder, not the Bin folder.

Copy the ManageScheduledTask.ps1 and ManageScheduledTask.strings files to the C:\Program Files\Microsoft\Exchange Server\V15\Bin\en-US\ folder, and again try uninstall.

If folder en-US does not exists then create it manually and copy the mentioned files.
Avatar of jenkinst
jenkinst

ASKER

Did not use encrypt certificates. After copying all the scripts into en-US and running setup, I get the following error.

rror:
The following error was generated when "$error.Clear();
          & $RoleBinPath\ServiceControl.ps1 -Operation:DisableServices -Roles:($RoleRoles.Replace('Role','').Split(',')) -SetupScriptsDirectory:$RoleBinPath;
          & $RoleBinPath\ServiceControl.ps1 -Operation:Stop -Roles:($RoleRoles.Replace('Role','').Split(',')) -IsDatacenter:([bool]$RoleIsDatacenter)
        " was run: "System.Management.Automation.MethodInvocationException: Exception calling "Reverse" with "1" argument(s): "Value cannot be null.
Parameter name: array" ---> System.ArgumentNullException: Value cannot be null.
Parameter name: array
   at System.Array.Reverse(Array array)
   at CallSite.Target(Closure , CallSite , Type , Object )
   --- End of inner exception stack trace ---
   at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
   at CallSite.Target(Closure , CallSite , Type , Object )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
   at System.Management.Automation.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)".
the previous error was do to setup disabling all the exchange services. Setting them back to automatic or manual corrected the error.
That's Good to here. Is uninstall progressing?
ran setup again and got a new error.
Error:
This server role can't be installed because the following roles aren't current: UnifiedMessagingRole
Please refer this article:
http://clintboessen.blogspot.com/2014/10/this-server-role-cant-be-installed.html

Back up the registry key first.

Make sure match the ConfiguredVersion key to  the UnpackedVersion key for UnifiedMessagingRole

and then try to uninstall.
I edited the registry and removed all the ConfiguredVersion & PostSetupVersion keys.  This got me past the UnifiedMessage Role error. The new error I am getting os a popup asking for Exchange 2007 Standard Anti-Spma filter Updates. The message is.

The installed product does not match the installation source. Until a matching source is provided or the installed product and source are synchronized this action can not be performed.

I checked the file path to the ASDat.msi and it is correct.  the end setup error is.


Error:
The following error was generated when "$error.Clear();
          install-MsiPackage `
          -PackagePath ($RoleInstallPath + "TransportRoles\agents\Hygiene\ASDat.MSI") `
          -LogFile ($RoleSetupLoggingPath + "\InstallASDat.msilog") `
          -PropertyValues ("ALLUSERS=1") `
          -UpdatesDir $RoleUpdatesDir
        " was run: "Microsoft.Exchange.Configuration.Tasks.TaskException: Installing product C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\agents\Hygiene\ASDat.MSI failed. Fatal error during installation. Error code is 1603. Last error reported by the MSI package is 'The source installation package for the product Microsoft Exchange 2007 Standard Anti-spam Filter Updates is out of sync with the client package. Try the installation again using a valid copy of the installation package 'ASDat.MSI'.'. ---> System.ComponentModel.Win32Exception: Fatal error during installation
   --- End of inner exception stack trace ---
   at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)
   at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target)
   at Microsoft.Exchange.Management.Deployment.InstallMsi.InstallPackageFile(String packagePath)
   at Microsoft.Exchange.Management.Deployment.InstallMsi.InternalProcessRecord()
   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()
   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
The new error I am getting os a popup asking for Exchange 2007 Standard Anti-Spma filter Updates.

do you have 2007 in the environment?  what is the exchange server history? they can't coexist


Can't install Exchange 2016 or later in a forest that contains Exchange 2007
https://docs.microsoft.com/en-us/exchange/plan-and-deploy/deployment-ref/ms-exch-setupreadiness-e16e12coexistenceminversionrequirement?view=exchserver-2019
I put back the ConfiguredVersion String Value in each role. Now I don't get as far. I have a different error


Error:
The following error was generated when "$error.Clear();
          $feVdirName = "PowerShell (Default Web Site)";
          $beVdirName = "PowerShell (Exchange Back End)";
          $vdirName = "PowerShell";
          $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";

          $vdir = get-PowerShellVirtualDirectory -ShowMailboxVirtualDirectories -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $beVdirName };
          if ($vdir -eq $null)
          {
            new-PowerShellVirtualDirectory $vdirName -Role Mailbox -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$true -RequireSSL:$true -WebSiteName "Exchange Back End" -Path ($RoleInstallPath + "ClientAccess\PowerShell-Proxy");
          }
          else
          {
            update-PowerShellVirtualDirectoryVersion -DomainController $RoleDomainController;
          }

          $vdir2 = get-PowerShellVirtualDirectory -ShowMailboxVirtualDirectories -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $feVdirName };
          if ($vdir2 -eq $null)
          {
            new-PowerShellVirtualDirectory $vdirName -Role Mailbox -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false -WebSiteName "Default Web Site" -AppPoolId "MSExchangePowerShellFrontEndAppPool";
          }
          else
          {
            update-PowerShellVirtualDirectoryVersion -DomainController $RoleDomainController;
          }
        " was run: "System.ArgumentException: The virtual directory 'PowerShell' already exists under 'Mail2.aci-industries.local/Default Web Site'.
Parameter name: VirtualDirectoryName
   at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)
   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.InternalValidate()
   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()
   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
My environment is Server 2016 / Exchange 2016. New server / New exchange that was being updated to CU12. I don't use the MS anti-spam. It was disabled before the CU12 attempt.
I do not have an exchange servers less then 2013.
The Action & Watermark values are under HubTransportRoles.  I delete them before running setup again.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.