JoshC189
Thank you for the reply and suggestion. We already had New-Alias Start-SetupService Start-Service in profile.ps1 so have added New-Alias Stop-SetupService Stop-Service as well.
I've just run the EXE again, it took 20 minutes or so and I started getting hopeful. It got to the Starting Services stage and then started to roll back. The error in "C:\ExchangeSetupLogs\ServiceControl.log" shows the same as when we ran ServiceControl.ps1 manually above: A parameter cannot be found that matches parameter name 'IgnoreTimeout'.
Full log below.
[15:21:35] -----------------------------------------------
[15:21:35] * ServiceControl.ps1: 11/08/2023 15:21:35
[15:21:35] Performing service control with options:
[15:21:35] Saving service and registry data
[15:21:35] Saving service state to 'C:\ExchangeSetupLogs\ServiceState.xml'...
[15:21:38] Saving services startup mode.
[15:21:38] Adding to installed roles list: AdminTools
[15:21:38] Adding to installed roles list: ClientAccessMailboxRole
[15:21:38] Adding to installed roles list: Mailbox
[15:21:38] Adding to installed roles list: Bridgehead
[15:21:38] Adding to installed roles list: Mailbox
[15:21:38] Adding to installed roles list: UnifiedMessaging
[15:21:38] Stopping services for the following roles: AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging
[15:21:38] Stopping services for 'AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging'...
[15:21:38] Stopping service 'WinMgmt'.
[15:21:38] Cannot stop service 'Windows Management Instrumentation (WinMgmt)' because it has dependent services. It can only be stopped if the Force flag is set.
[15:21:38] Unable to stop all services for AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging.
[15:21:38] Script completed with one or more errors.
[15:40:28] -----------------------------------------------
[15:40:28] * ServiceControl.ps1: 11/08/2023 15:40:28
[15:40:28] Performing service control with options:
[15:40:30] Adding to installed roles list: AdminTools
[15:40:30] Adding to installed roles list: ClientAccessMailboxRole
[15:40:30] Adding to installed roles list: Mailbox
[15:40:30] Adding to installed roles list: Bridgehead
[15:40:30] Adding to installed roles list: Mailbox
[15:40:30] Adding to installed roles list: UnifiedMessaging
[15:40:30] Enabling services for the following roles: AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging
[15:40:30] Enabling services for 'AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging'...
[15:40:30] Reading service registry data from 'C:\ExchangeSetupLogs\ServiceStartupMode.xml'
[15:40:30] Loaded state for 257 services registry
[15:40:30] Enabling service 'FMS'.
[15:40:30] Enabling service 'HealthService'.
[15:40:30] Enabling service 'hostcontrollerservice'.
[15:40:30] Enabling service 'IISAdmin'.
[15:40:30] Enabling service 'MSExchangeADTopology'.
[15:40:30] Enabling service 'MSExchangeAntispamUpdate'.
[15:40:30] Enabling service 'MSExchangeDagMgmt'.
[15:40:30] Enabling service 'MSExchangeDelivery'.
[15:40:30] Enabling service 'MSExchangeDiagnostics'.
[15:40:30] Enabling service 'MSExchangeEdgeSync'.
[15:40:30] Enabling service 'MSExchangeFastSearch'.
[15:40:30] Enabling service 'MSExchangeFrontendTransport'.
[15:40:30] Enabling service 'MSExchangeHM'.
[15:40:30] Enabling service 'MSExchangeHMRecovery'.
[15:40:30] Enabling service 'MSExchangeIMAP4'.
[15:40:30] Enabling service 'MSExchangeIMAP4BE'.
[15:40:30] Enabling service 'MSExchangeIS'.
[15:40:30] Enabling service 'MSExchangeMailboxAssistants'.
[15:40:30] Enabling service 'MSExchangeMailboxReplication'.
[15:40:30] Enabling service 'MSExchangePOP3'.
[15:40:30] Enabling service 'MSExchangePOP3BE'.
[15:40:30] Enabling service 'MSExchangeRepl'.
[15:40:30] Enabling service 'MSExchangeRPC'.
[15:40:30] Enabling service 'MSExchangeServiceHost'.
[15:40:30] Enabling service 'MSExchangeSubmission'.
[15:40:30] Enabling service 'MSExchangeThrottling'.
[15:40:30] Enabling service 'MSExchangeTransport'.
[15:40:30] Enabling service 'MSExchangeTransportLogSearch'.
[15:40:30] Enabling service 'MSExchangeUM'.
[15:40:30] Enabling service 'pla'.
[15:40:30] Enabling service 'RemoteRegistry'.
[15:40:30] Enabling service 'SearchExchangeTracing'.
[15:40:30] Enabling service 'W3Svc'.
[15:40:30] Enabling service 'WinMgmt'.
[15:40:30] Enabling service 'wsbexchange'.
[15:40:30] Starting services for AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging...
[15:40:30] Reading service state from 'C:\ExchangeSetupLogs\ServiceState.xml'...
[15:40:31] Loaded state for 257 services
[15:40:31] Starting services and their dependents.
[15:40:31] (0) Enter: RestoreServiceAndDependents 'FMS'.
[15:40:31] 'FMS' was not running.
[15:40:31] (0) FMS was not previously running.
[15:40:31] (0) Exit: RestoreServiceAndDependents 'FMS'
[15:40:31] (0) Enter: RestoreServiceAndDependents 'HealthService'.
[15:40:31] 'HealthService' was running.
[15:40:31] (0) Starting HealthService...
[15:40:31] [Error] System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'IgnoreTimeout'.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
[15:40:32] -----------------------------------------------
[15:40:32] * ServiceControl.ps1: 11/08/2023 15:40:32
[15:40:32] Performing service control with options:
[15:40:33] Saving service and registry data
[15:40:33] State file C:\ExchangeSetupLogs\ServiceState.xml already exists.
[15:40:33] Overwrite is specified. File C:\ExchangeSetupLogs\ServiceState.xml is going to be overwritten with a new state.
[15:40:33] Saving service state to 'C:\ExchangeSetupLogs\ServiceState.xml'...
[15:40:36] State file C:\ExchangeSetupLogs\ServiceStartupMode.xml already exists.
[15:40:36] Overwrite is specified. File C:\ExchangeSetupLogs\ServiceStartupMode.xml is going to be overwritten with a new state.
[15:40:36] Saving services startup mode.
[15:40:36] Adding to installed roles list: AdminTools
[15:40:36] Adding to installed roles list: ClientAccessMailboxRole
[15:40:36] Adding to installed roles list: Mailbox
[15:40:36] Adding to installed roles list: Bridgehead
[15:40:36] Adding to installed roles list: Mailbox
[15:40:36] Adding to installed roles list: UnifiedMessaging
[15:40:36] Stopping services for the following roles: AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging
[15:40:36] Stopping services for 'AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging'...
[15:40:36] Stopping service 'WinMgmt'.
[15:40:36] Cannot stop service 'Windows Management Instrumentation (WinMgmt)' because it has dependent services. It can only be stopped if the Force flag is set.
[15:40:36] Unable to stop all services for AdminTools ClientAccess FrontendTransport Bridgehead Mailbox UnifiedMessaging.
[15:40:36] Script completed with one or more errors.