Edit

Share via


Repair-OfficeWebAppsFarm

Removes all servers flagged as unhealthy from an Office Online Server farm.

Syntax

Default (Default)

Repair-OfficeWebAppsFarm
    [-Force]
    [-WhatIf]
    [-Confirm]

Description

The Repair-OfficeWebAppsFarm cmdlet removes all servers flagged as unhealthy from an Office Online Server farm. This cmdlet updates the farm topology but does not clean up services and web applications on the servers that are removed. For this reason, we recommend making every effort to run the Remove-OfficeWebAppsMachine cmdlet from the unhealthy servers so that they are cleanly removed from the farm. Use the Repair-OfficeWebAppsFarm cmdlet only if the unhealthy servers have failed and you cannot run the Remove-OfficeWebAppsMachine cmdlet directly on them.

If there are multiple unhealthy servers, you are prompted before each server is removed. If there are no unhealthy servers, this cmdlet does nothing.

Examples

EXAMPLE 1

(Get-OfficeWebAppsFarm).Machines

This example displays the health status of all servers in the Office Online Server farm.

EXAMPLE 2

Repair-OfficeWebAppsFarm

This example removes all unhealthy servers from the Office Online Server farm.

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Assumes the answer to any user prompt is Yes.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Displays a message that describes the effect of the command instead of executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False