Restart-PcsvDevice

Restart-PcsvDevice

Restarts a remote hardware device.

Sintaxis

Parameter Set: InputObject (cdxml)
Restart-PcsvDevice -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByComputerName
Restart-PcsvDevice [-TargetAddress] <String> [-Credential] <PSCredential> [-ManagementProtocol] <ManagementProtocol> [[-Port] <UInt16> ] [-AsJob] [-Authentication <Authentication> ] [-CimSession <CimSession[]> ] [-PassThru] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-ThrottleLimit <Int32> ] [-TimeoutSec <UInt32> ] [-UseSSL] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Restart-PcsvDevice cmdlet restarts a device remotely by using Web Services for Management (WS-Management) or Intelligent Platform Management Interface (IPMI). The cmdlet restarts the device if the current state of the device is enabled, or starts the device if the current state is other than enabled. If you specify a device that is a Baseboard Management Controller (BMC), the cmdlet restarts the system that the BMC manages, and not the BMC.

Parámetros

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Authentication<Authentication>

Specifies an authentication method to use for devices managed by WS-Management. Do not specify this parameter for devices managed by using IPMI. Los valores aceptables para este parámetro son los siguientes:

-- Basic
-- Digest
-- Default

If you specify Default for this parameter and a value of WSMAN for the ManagementProtocol parameter, the cmdlet uses Basic authentication.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Credential<PSCredential>

Specifies a PSCredential object based on a user name and password. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential. This parameter specifies the credential for the remote hardware device.

Alias

ninguno

¿Requerido?

true

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-InputObject<CimInstance[]>

Specifies an array of devices, as MSFT_PCSVDevice objects, to manage. To obtain MSFT_PCSVDevice objects, use the Get-PcsvDevice cmdlet.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue)

¿Aceptar caracteres comodín?

false

-ManagementProtocol<ManagementProtocol>

Specifies a management protocol used to communicate with a device. Los valores aceptables para este parámetro son los siguientes:

-- WSMAN
-- IPMI

Specify WSMAN for WS-Management devices that represent information by using Systems Management Architecture for Server Hardware (SMASH), Desktop and mobile Architecture for System Hardware (DASH) or Physical Computer System View profiles. Refer to your hardware documentation for supported management protocols.

Alias

MP

¿Requerido?

true

¿Posición?

4

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PassThru

Devuelve un objeto que representa el elemento con el que está trabajando. De forma predeterminada, este cmdlet no genera ningún resultado.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Port<UInt16>

Specifies a port on the remote computer to use for the management connection. If you do not specify a port, the cmdlet uses the following default ports:

-- IPMI and WSMAN over HTTP. Port 623.
-- WSMAN over HTTPS. Port 664

Alias

ninguno

¿Requerido?

false

¿Posición?

5

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SkipCACheck

Indicates that the client connects by using HTTPS without validating that a trusted CA signed the server certificate.

Do not specify this parameter unless you can establish trust in another way, such as if the remote computer is part of a network that is physically secure and isolated, or if the remote computer is a trusted host in a Windows Remote Management (WinRM) configuration. Do not specify this parameter if you specify a value of IPMI for the ManagementProtocol parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SkipCNCheck

Indicates that the certificate common name of the server does not need to match the host name of the server.

Specify this parameter only for managing devices by using WS-Management over HTTPS. Be sure to specify this parameter only for trusted computers. Do not specify this parameter if you specify a value of IPMI for the ManagmentProtocol parameter.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-SkipRevocationCheck

Indicates that the cmdlet skips the revocation check of server certificates. Do not specify this parameter if you specify a value of IPMI for the ManagmentProtocol parameter.

Be sure to specify this parameter only for trusted computers.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-TargetAddress<String>

Specifies the name or IP address of the management port on the remote hardware device. For server hardware, this is typically a dedicated Baseboard Management Controller (BMC) IP address. For other devices, like network switches, this is the IP address of their management port. For desktop and mobile devices, the BMC sometimes shares the same IP address as the computer.

Alias

CN,ComputerName,IpAddress

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-TimeoutSec<UInt32>

Specifies how long to wait, in seconds, for a response from the remote hardware device. After this period, the cmdlet abandons the connection attempt.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-UseSSL

Indicates that the server connects to the target computer by using SSL. WS-Management encrypts all content transmitted over the network. Specify this parameter to use the additional protection of HTTPS instead of HTTP. If you specify this parameter and SSL is not available on the connection port, the command fails.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/HardwareManagement/MSFT_PCSVDevice

    The cmdlet only returns an MSFT_PCSVDevice object if you specify the PassThru parameter.

Ejemplos

Example 1: Restart a remote IPMI hardware device

This example restarts an IPMI device remotely.

The first command uses the Get-Credential cmdlet to create a credential, and then stores it in the $Credential variable. The cmdlet prompts you for a user name and password. For more information, type Get-Help Get-Credential.

The second command connects with the target computer that has the IP address 10.0.0.29 by using the IPMI management protocol The command specifies the credential object stored in the $Credential variable. The command prompts the user for confirmation because restarting the system can cause a loss of unsaved state.

PS C:\> $Credential = Get-Credential Admin
PS C:\> Restart-PCSVDevice -TargetAddress 10.0.0.29 -ManagementProtocol IPMI -Credential $Credential

Example 2: Restart an IPMI device remotely by using an object variable

This example restarts an IPMI device remotely by using an object variable to specify the device.

The first command uses the Get-Credential cmdlet to create a credential, and then stores it in the $Credential variable. The cmdlet prompts you for a user name and password. For more information, type Get-Help Get-Credential.

The second command uses the Get-PcsvDevice cmdlet to connect with the target computer that has the IP address 10.0.0.29 by using the IPMI management protocol and the credential object stored in the $Credential variable. The command gets the remote device object and passes the object to the Restart-PcsvDevice cmdlet by using the pipeline operator. The Restart-PcsvDevice cmdlet restarts the remote device. The command sets the Confirm parameter to $False so the cmdlet does not prompt the user for confirmation to restart the device.

PS C:\> $Credential = Get-Credential Admin
PS C:\> Get-PcsvDevice -TargetAddress 10.0.0.29 -ManagementProtocol IPMI -Credential $Credential | Restart-PcsvDevice -Confirm $False

Temas relacionados

Get-PcsvDevice

Start-PcsvDevice

Stop-PcsvDevice