Editar

Restart-HcsController

Restarts a controller.

Syntax

Restart-HcsController
       [-ControllerId <ControllerIds>]
       [-Force]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Restart-HcsController cmdlet restarts a controller. If you run the cmdlet without any parameters, it restarts the current controller. The current controller is the controller where you run the cmdlet. You can use the ControllerID parameter to specify a different controller to restart.

Examples

Example 1: Restart a controller

PS C:\> Restart-HcsController -ControllerId 0
Checking device state...

This command will restart your standby controller.
Are you sure you want to continue with this operation?
[Y] Yes  [N] No  [?] Help (default is "Y"): y

This command restarts the controller specified by the ControllerID parameter. In this example, controller0 is the standby controller.

Example 2: Restart the current controller

PS C:\> Restart-HcsController

Checking device state...

This command will restart your active controller. Restarting the active controller will cause a failover to the standby
controller.
Are you sure you want to continue with this operation?
[Y] Yes  [N] No  [?] Help (default is "Y"): n

This command restarts the current controller. In this example, the controller is the active controller. The current controller does not have to be the active controller.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ControllerId

Specifies controller0 or controller1.

Type:ControllerIds
Accepted values:Controller0, Controller1
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False