Restart-HcsController

Restart-HcsController

Restarts a controller.

Syntax

Parameter Set: Default
Restart-HcsController [-ControllerId <ControllerIds> {Controller0 | Controller1} ] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed 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.

Parameters

-ControllerId<ControllerIds>

Specifies controller0 or controller1.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Restart a controller

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

PS C:\> Restart-HcsController -ControllerId 0

Example 2: Restart the current controller

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.

PS C:\> Restart-HcsController

Stop-HcsController