Error:
The following error was generated when "$error.Clear();
try
{
$Target = $env:COMPUTERNAME
try
{
$exSrv = get-ExchangeServer $Target -ErrorAction SilentlyContinue -DomainController $RoleDomainController
}
catch
{
Write-ExchangeSetupLog -Warning "Unable to set monitoring and server state to inactive. Setup will continue.";
}
if ($exSrv -eq $null)
{
Write-ExchangeSetupLog -Warning "$Target is not an Exchange Server. Unable to set monitoring and server state to inactive. Setup will continue.";
return
}
Set-ServerComponentState $Target -Component Monitoring -Requester Functional -State Inactive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "Monitoring has been set to Inactive while setup is running."
Set-ServerComponentState $Target -Component ServerWideOffline -Requester Functional -State InActive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "The server state has been set to Inactive while setup is running."
try
{
$PreviousState = Get-ServerComponentState $Target -Component RecoveryActionsEnabled -ErrorAction:SilentlyContinue
if($PreviousState.State -eq 'Unknown')
{
Write-ExchangeSetupLog -Info "Previous RecoveryActionsEnabled state is unknown, skip set RecoveryActionsEnabled to Inactive"
return
}
}
catch
{
Write-ExchangeSetupLog -Warning "Fail to check previous state of RecoveryActionsEnabled, set it as before.";
}
Set-ServerComponentState $Target -Component RecoveryActionsEnabled -Requester Functional -State Inactive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "RecoveryActionsEnabled has been set to Inactive while setup is running."
}
catch
{
Write-ExchangeSetupLog -Warning "Unable to set monitoring and server state to inactive. Setup can not continue.";
throw;
}
" was run: "Microsoft.Exchange.Data.InvalidObjectOperationException: The property 'ComponentStates' is on a read-only object and can't be modified.
at Microsoft.Exchange.Data.PropertyBag.set_Item(PropertyDefinition key, Object value)
at Microsoft.Exchange.Data.Directory.ADPropertyBag.set_Item(PropertyDefinition key, Object value)
at Microsoft.Exchange.Data.ConfigurableObject.set_Item(PropertyDefinition propertyDefinition, Object value)
at Microsoft.Exchange.Management.SystemConfigurationTasks.SetServerComponentState.UpdateCongfigDC(ITopologyConfigurationSession cfgSession, String srvName, String fqdn, Server& srv, ADComputer& computer)
at Microsoft.Exchange.Management.SystemConfigurationTasks.SetServerComponentState.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.b__91_1()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
Error:
The following error was generated when "$error.Clear();
try
{
$Target = $env:COMPUTERNAME
try
{
$exSrv = get-ExchangeServer $Target -ErrorAction SilentlyContinue -DomainController $RoleDomainController
}
catch
{
Write-ExchangeSetupLog -Warning "Unable to set monitoring and server state to inactive. Setup will continue.";
}
if ($exSrv -eq $null)
{
Write-ExchangeSetupLog -Warning "$Target is not an Exchange Server. Unable to set monitoring and server state to inactive. Setup will continue.";
return
}
Set-ServerComponentState $Target -Component Monitoring -Requester Functional -State Inactive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "Monitoring has been set to Inactive while setup is running."
Set-ServerComponentState $Target -Component ServerWideOffline -Requester Functional -State InActive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "The server state has been set to Inactive while setup is running."
try
{
$PreviousState = Get-ServerComponentState $Target -Component RecoveryActionsEnabled -ErrorAction:SilentlyContinue
if($PreviousState.State -eq 'Unknown')
{
Write-ExchangeSetupLog -Info "Previous RecoveryActionsEnabled state is unknown, skip set RecoveryActionsEnabled to Inactive"
return
}
}
catch
{
Write-ExchangeSetupLog -Warning "Fail to check previous state of RecoveryActionsEnabled, set it as before.";
}
Set-ServerComponentState $Target -Component RecoveryActionsEnabled -Requester Functional -State Inactive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "RecoveryActionsEnabled has been set to Inactive while setup is running."
}
catch
{
Write-ExchangeSetupLog -Warning "Unable to set monitoring and server state to inactive. Setup can not continue.";
throw;
}
" was run: "Microsoft.Exchange.Data.InvalidObjectOperationException: The property 'ComponentStates' is on a read-only object and can't be modified.
at Microsoft.Exchange.Data.PropertyBag.set_Item(PropertyDefinition key, Object value)
at Microsoft.Exchange.Data.Directory.ADPropertyBag.set_Item(PropertyDefinition key, Object value)
at Microsoft.Exchange.Data.ConfigurableObject.set_Item(PropertyDefinition propertyDefinition, Object value)
at Microsoft.Exchange.Management.SystemConfigurationTasks.SetServerComponentState.UpdateCongfigDC(ITopologyConfigurationSession cfgSession, String srvName, String fqdn, Server& srv, ADComputer& computer)
at Microsoft.Exchange.Management.SystemConfigurationTasks.SetServerComponentState.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.b__91_1()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
Error:
The following error was generated when "$error.Clear();
try
{
$Target = $env:COMPUTERNAME
try
{
$exSrv = get-ExchangeServer $Target -ErrorAction SilentlyContinue -DomainController $RoleDomainController
}
catch
{
Write-ExchangeSetupLog -Warning "Unable to set monitoring and server state to inactive. Setup will continue.";
}
if ($exSrv -eq $null)
{
Write-ExchangeSetupLog -Warning "$Target is not an Exchange Server. Unable to set monitoring and server state to inactive. Setup will continue.";
return
}
Set-ServerComponentState $Target -Component Monitoring -Requester Functional -State Inactive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "Monitoring has been set to Inactive while setup is running."
Set-ServerComponentState $Target -Component ServerWideOffline -Requester Functional -State InActive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "The server state has been set to Inactive while setup is running."
try
{
$PreviousState = Get-ServerComponentState $Target -Component RecoveryActionsEnabled -ErrorAction:SilentlyContinue
if($PreviousState.State -eq 'Unknown')
{
Write-ExchangeSetupLog -Info "Previous RecoveryActionsEnabled state is unknown, skip set RecoveryActionsEnabled to Inactive"
return
}
}
catch
{
Write-ExchangeSetupLog -Warning "Fail to check previous state of RecoveryActionsEnabled, set it as before.";
}
Set-ServerComponentState $Target -Component RecoveryActionsEnabled -Requester Functional -State Inactive -DomainController $RoleDomainController
Write-ExchangeSetupLog -Info "RecoveryActionsEnabled has been set to Inactive while setup is running."
}
catch
{
Write-ExchangeSetupLog -Warning "Unable to set monitoring and server state to inactive. Setup can not continue.";
throw;
}
" was run: "Microsoft.Exchange.Data.InvalidObjectOperationException: The property 'ComponentStates' is on a read-only object and can't be modified.
at Microsoft.Exchange.Data.PropertyBag.set_Item(PropertyDefinition key, Object value)
at Microsoft.Exchange.Data.Directory.ADPropertyBag.set_Item(PropertyDefinition key, Object value)
at Microsoft.Exchange.Data.ConfigurableObject.set_Item(PropertyDefinition propertyDefinition, Object value)
at Microsoft.Exchange.Management.SystemConfigurationTasks.SetServerComponentState.UpdateCongfigDC(ITopologyConfigurationSession cfgSession, String srvName, String fqdn, Server& srv, ADComputer& computer)
at Microsoft.Exchange.Management.SystemConfigurationTasks.SetServerComponentState.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.b__91_1()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".