Invoke-CsComputerFailOver
Use the Invoke-CsComputerFailOver to force a computer in a Skype for Business Server pool to failover to other servers within the pool. To successfully run this cmdlet you need to run it using an account that has administrator privileges on each server in the source and target pools.
Syntax
Invoke-CsComputerFailOver
[[-ComputerName] <String>]
[-Confirm]
[-Force]
[-NoStop]
[-Report <String>]
[-WaitTime <TimeSpan>]
[-WhatIf]
[-DrainingTimeout <TimeSpan>]
[-SkipFabricHealthCheck]
[<CommonParameters>]
Description
The Invoke-CsComputerFailOver cmdlet migrates the users and data, and drains the existing conferences and sessions before the Skype for Business services are stopped and disabled to prevent accidental restart when computer is rebooted.
The Invoke-CsComputerFailOver cmdlet functionality is not available in the Skype for Business Server Control Panel.
To return a list of all the Role-Based Access Control (RBAC) roles a cmdlet has been assigned to (including any custom RBAC roles you have created), run the following command from the Windows PowerShell prompt.
Get-CsAdminRole | Where-Object {$_.Cmdlets -Match "\<DesiredCmdletName\>"}
Examples
-------------------------- Example 1 -------------------------- (Skype for Business Server 2015)
Invoke-CsComputerFailOver -ComputerName "atl-mcs-001.litwareinc.com" -Report "C:\Logs\S1_FailOverLog.html" -WaitTime 1:30:00
This example directs that the users assigned to server "atl-mcs-001.litwareinc.com" will be moved to other servers in the pool. The log output path is specified and the cmdlet will wait 1 hour 30 minutes before timing out.
-------------------------- Example 2 -------------------------- (Skype for Business Server 2015)
$TimeSpan = New-TimeSpan -Minutes 30
Invoke-CsComputerFailOver -ComputerName "atl-mcs-001.litwareinc.com" -DrainingTimeout $TimeSpan
This example force to drain all conferences and sessions after 30 minutes. If users aren't moved to different front end after 30 minutes, it will drain all conferences and sessions and stop all services in the front end.
Parameters
-ComputerName
Specifies the computer name to fail over.
The computer should be referenced by using its fully qualified domain name (FQDN).
For example, -ComputerName "atl-mcs-001.litwareinc.com".
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-Confirm
Prompts you for confirmation before executing the command.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-DrainingTimeout
Draining timeout in TimeSpan format to gracefully drain MCUs.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-Force
If the Force parameter is specified, the server is failed over without verifying the pool's capacity to absorb the failed over server's workload.
Note: If you run this parameter together with -WhatIf parameter, it will be ignored and a server failover will be started.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-NoStop
If specified, Skype for Business Server services will not be stopped as part of the failover. This maintains the failed over server's state for additional scripting or troubleshooting.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-Report
Specifies the file path for the log file created when the cmdlet runs.
For example: -Report "C:\Logs\S1_FailOverLog.html".
If this file already exists, it will be overwritten.
By default, reports are written to the "AppData\Local\Temp" folder in your user profile.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-SkipFabricHealthCheck
This parameter is reserved for internal Microsoft use.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-WaitTime
Specifies the amount of time in TimeSpan format that the cmdlet will wait for confirmation that users and data have been migrated, and all conferences and sessions have been drained. If the wait time is exceeded, the cmdlet fails and no action is taken on the specified server. The default is one hour.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Applies to: | Skype for Business Server 2015, Skype for Business Server 2019 |
Inputs
None. The Invoke-CsComputerFailOver cmdlet does not accept pipelined input.
Outputs
None.