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\ServiceContro l.ps1 -Operation:DisableServices -Roles:($RoleRoles.Replace ('Role','' ).Split(', ')) -SetupScriptsDirectory:$Ro leBinPath;
& $RoleBinPath\ServiceContro l.ps1 -Operation:Stop -Roles:($RoleRoles.Replace ('Role','' ).Split(', ')) -IsDatacenter:([bool]$Role IsDatacent er)
" was run: "System.Management.Automat ion.PSInva lidOperati onExceptio n: Cannot find the Windows PowerShell data file 'ManageScheduledTask.Strin gs.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
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\ServiceContro
& $RoleBinPath\ServiceContro
" was run: "System.Management.Automat
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
All Exchange scripts are located in the Scripts folder, not the Bin folder.
Copy the ManageScheduledTask.ps1 and ManageScheduledTask.string s 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.
Copy the ManageScheduledTask.ps1 and ManageScheduledTask.string
If folder en-US does not exists then create it manually and copy the mentioned files.
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\ServiceContro l.ps1 -Operation:DisableServices -Roles:($RoleRoles.Replace ('Role','' ).Split(', ')) -SetupScriptsDirectory:$Ro leBinPath;
& $RoleBinPath\ServiceContro l.ps1 -Operation:Stop -Roles:($RoleRoles.Replace ('Role','' ).Split(', ')) -IsDatacenter:([bool]$Role IsDatacent er)
" was run: "System.Management.Automat ion.Method Invocation Exception: Exception calling "Reverse" with "1" argument(s): "Value cannot be null.
Parameter name: array" ---> System.ArgumentNullExcepti on: 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.Automati on.Excepti onHandling Ops.Conver tToMethodI nvocationE xception(E xception exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
at CallSite.Target(Closure , CallSite , Type , Object )
at System.Dynamic.UpdateDeleg ates.Updat eAndExecut e2[T0,T1,T Ret](CallS ite site, T0 arg0, T1 arg1)
at System.Management.Automati on.Interpr eter.Dynam icInstruct ion`3.Run( Interprete dFrame frame)
at System.Management.Automati on.Interpr eter.Enter TryCatchFi nallyInstr uction.Run (Interpret edFrame frame)".
rror:
The following error was generated when "$error.Clear();
& $RoleBinPath\ServiceContro
& $RoleBinPath\ServiceContro
" was run: "System.Management.Automat
Parameter name: array" ---> System.ArgumentNullExcepti
Parameter name: array
at System.Array.Reverse(Array
at CallSite.Target(Closure , CallSite , Type , Object )
--- End of inner exception stack trace ---
at System.Management.Automati
at CallSite.Target(Closure , CallSite , Type , Object )
at System.Dynamic.UpdateDeleg
at System.Management.Automati
at System.Management.Automati
ASKER
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?
ASKER
ran setup again and got a new error.
Error:
This server role can't be installed because the following roles aren't current: UnifiedMessagingRole
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.
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.
ASKER
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\Hyg iene\ASDat .MSI") `
-LogFile ($RoleSetupLoggingPath + "\InstallASDat.msilog") `
-PropertyValues ("ALLUSERS=1") `
-UpdatesDir $RoleUpdatesDir
" was run: "Microsoft.Exchange.Config uration.Ta sks.TaskEx ception: Installing product C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\ agents\Hyg iene\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.Win3 2Exception : Fatal error during installation
--- End of inner exception stack trace ---
at Microsoft.Exchange.Configu ration.Tas ks.Task.Th rowError(E xception exception, ErrorCategory errorCategory, Object target, String helpUrl)
at Microsoft.Exchange.Configu ration.Tas ks.Task.Wr iteError(E xception exception, ErrorCategory category, Object target)
at Microsoft.Exchange.Managem ent.Deploy ment.Insta llMsi.Inst allPackage File(Strin g packagePath)
at Microsoft.Exchange.Managem ent.Deploy ment.Insta llMsi.Inte rnalProces sRecord()
at Microsoft.Exchange.Configu ration.Tas ks.Task.<P rocessReco rd>b__91_1 ()
at Microsoft.Exchange.Configu ration.Tas ks.Task.In vokeRetrya bleFunc(St ring funcName, Action func, Boolean terminatePipelineIfFailed) ".
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\Hyg
-LogFile ($RoleSetupLoggingPath + "\InstallASDat.msilog") `
-PropertyValues ("ALLUSERS=1") `
-UpdatesDir $RoleUpdatesDir
" was run: "Microsoft.Exchange.Config
--- End of inner exception stack trace ---
at Microsoft.Exchange.Configu
at Microsoft.Exchange.Configu
at Microsoft.Exchange.Managem
at Microsoft.Exchange.Managem
at Microsoft.Exchange.Configu
at Microsoft.Exchange.Configu
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
ASKER
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-PowerShellVirtualDirec tory -ShowMailboxVirtualDirecto ries -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $beVdirName };
if ($vdir -eq $null)
{
new-PowerShellVirtualDirec tory $vdirName -Role Mailbox -DomainController $RoleDomainController -BasicAuthentication:$fals e -WindowsAuthentication:$tr ue -RequireSSL:$true -WebSiteName "Exchange Back End" -Path ($RoleInstallPath + "ClientAccess\PowerShell-P roxy");
}
else
{
update-PowerShellVirtualDi rectoryVer sion -DomainController $RoleDomainController;
}
$vdir2 = get-PowerShellVirtualDirec tory -ShowMailboxVirtualDirecto ries -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $feVdirName };
if ($vdir2 -eq $null)
{
new-PowerShellVirtualDirec tory $vdirName -Role Mailbox -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$fals e -WindowsAuthentication:$fa lse -RequireSSL:$false -WebSiteName "Default Web Site" -AppPoolId "MSExchangePowerShellFront EndAppPool ";
}
else
{
update-PowerShellVirtualDi rectoryVer sion -DomainController $RoleDomainController;
}
" was run: "System.ArgumentException: The virtual directory 'PowerShell' already exists under 'Mail2.aci-industries.loca l/Default Web Site'.
Parameter name: VirtualDirectoryName
at Microsoft.Exchange.Configu ration.Tas ks.Task.Th rowError(E xception exception, ErrorCategory errorCategory, Object target, String helpUrl)
at Microsoft.Exchange.Managem ent.System Configurat ionTasks.N ewExchange VirtualDir ectory`1.I nternalVal idate()
at Microsoft.Exchange.Configu ration.Tas ks.Task.<P rocessReco rd>b__91_1 ()
at Microsoft.Exchange.Configu ration.Tas ks.Task.In vokeRetrya bleFunc(St ring funcName, Action func, Boolean terminatePipelineIfFailed) ".
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-PowerShellVirtualDirec
if ($vdir -eq $null)
{
new-PowerShellVirtualDirec
}
else
{
update-PowerShellVirtualDi
}
$vdir2 = get-PowerShellVirtualDirec
if ($vdir2 -eq $null)
{
new-PowerShellVirtualDirec
}
else
{
update-PowerShellVirtualDi
}
" was run: "System.ArgumentException:
Parameter name: VirtualDirectoryName
at Microsoft.Exchange.Configu
at Microsoft.Exchange.Managem
at Microsoft.Exchange.Configu
at Microsoft.Exchange.Configu
ASKER
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.
ASKER
I do not have an exchange servers less then 2013.
ASKER
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 TRIALMembers 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.
https://www.stephenwagner.com/2019/02/19/exchange-2016-cu12-install-upgrade-fails-using-lets-encrypt-ssl-cert/