Share via


Set-PcsvDeviceBootConfiguration

Set-PcsvDeviceBootConfiguration

Modifies the boot configuration on the remote hardware device.

Syntaxe

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

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

Description détaillée

The Set-PcsvDeviceBootConfiguration cmdlet modifies the boot configuration for a remote hardware device. To retrieve the current boot configuration for a device, use the Get-PcsvDevice cmdlet.

The StructuredBootString property of the returned instance lists the valid boot sources, and the OneTimeBootSource property indicates whether one of the valid boot sources has already been configured to be the primary boot source for the next time the device undergoes a full restart.

Paramètres

-AsJob

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-Authentication<Authentication>

Specifies an authentication method to use for devices managed by Web Services for Management (WS-Management). Do not use this parameter for devices managed by using Intelligent Platform Management Interface (IPMI). Les valeurs acceptables pour ce paramètre sont :

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

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-CimSession<CimSession[]>

Exécute l’applet de commande dans une session à distance ou sur un ordinateur distant. Entrez un nom d’ordinateur ou un objet de session, comme la sortie d’une applet de commande New-CimSession ou Get-CimSession. La valeur par défaut est la session active sur l’ordinateur local.

Alias

Session

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

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

none

Obligatoire ?

true

Position ?

3

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-InputObject<CimInstance[]>

Specifies an array of devices, as MSFT_PCSVDevice objects, to manage. To obtain MSFT_PCSVDevice objects, use the Get-PcsvDevice cmdlet. This parameter specifies the credential for the remote hardware device.

Alias

none

Obligatoire ?

true

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByValue)

Accepter les caractères génériques ?

false

-ManagementProtocol<ManagementProtocol>

Specifies a management protocol used to communicate with a device. Les valeurs acceptables pour ce paramètre sont :

-- WSMAN
-- IPMI

Refer to your hardware documentation for supported management protocols.

Specify WSMAN for 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.

Alias

MP

Obligatoire ?

true

Position ?

4

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-OneTimeBootSource<String>

Specifies a one-time boot source, in the format CIM:<identifier>:<index>. For example, you can specify a boot source as CIM:Network:1. The StructuredBootString property of the PcsvDevice instance contains a list of valid boot sources.

Alias

OT,NextBoot

Obligatoire ?

true

Position ?

2002

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-PassThru

Retourne un objet qui représente l’élément avec lequel vous travaillez. Par défaut, cette applet de commande ne génère aucun résultat.

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-Port<UInt16>

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

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

Alias

none

Obligatoire ?

false

Position ?

5

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

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 if you specify a value of IPMI for the ManagmentProtocol parameter.

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.

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-SkipCNCheck

Indicates that the certificate common name of the server does not need to match the hostname of the server. Do not specify this parameter if you specify a value of IPMI for the ManagmentProtocol parameter.

Specify this parameter only for remote operations with WS-Management devices that use the HTTPS protocol. Use this parameter only for trusted computers.

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

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

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

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

Obligatoire ?

true

Position ?

2

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-ThrottleLimit<Int32>

Spécifie le nombre maximal d’opérations simultanées qui peuvent être établies pour exécuter cette applet de commande. Si ce paramètre est omis ou si la valeur 0 est entrée, Windows PowerShell ® calcule une limitation optimale pour l’applet de commande en fonction du nombre d’applets de commande CIM qui s’exécutent sur l’ordinateur. La limitation s’applique seulement à l’applet de commande actuelle, et non pas à la session ni à l’ordinateur.

Alias

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

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

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-UseSSL

Indicates that the cmdlet connects to a remote device 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

none

Obligatoire ?

false

Position ?

named

Valeur par défaut

none

Accepter l’entrée de pipeline ?

True (ByPropertyName)

Accepter les caractères génériques ?

false

-Confirm

Votre confirmation sera requise avant l’exécution de l’applet de commande.

Obligatoire ?

false

Position ?

named

Valeur par défaut

false

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

-WhatIf

Présente les conséquences éventuelles de l’exécution de l’applet de commande. L’applet de commande n’est pas exécutée.

Obligatoire ?

false

Position ?

named

Valeur par défaut

false

Accepter l’entrée de pipeline ?

false

Accepter les caractères génériques ?

false

<CommonParameters>

Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d’informations, consultez about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entrées

Le type d’entrée correspond au type des objets que vous pouvez transmettre à l’applet de commande.

Sorties

Le type de sortie est le type des objets émis par l’applet de commande.

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

    The PCSV device is only returned as output if the PassThru parameter is specified.

Exemples

Example 1 Modify the device boot configuration to use PXE boot

This example configures the boot source to use Pre-Boot Execution Environment (PXE) boot the next time the system boots.

The first command uses the Get-Credential cmdlet to get credentials, and stores the credentials in the variable named $MyCred. The cmdlet prompts you for a user name and password. For more information, type Get-Help Get-Credential.

The second command modifies the device boot configuration for the target computer, by using the OneTimeBootSource parameter to specify the boot configuration.

PS C:\> $MyCred = Get-Credential
PS C:\> Set-PCSVDeviceBootConfiguration -TargetAdress 10.1.12.43 -ManagementProtocol WSMan -Credential $MyCred -UseSSL -OneTimeBootSource "CIM:Network:1"

Example 2: Modify the device boot configuration to use the DVD drive

This example configures the boot source to use the DVD drive for the next time the system boots.

The first command uses the Get-Credential cmdlet to get credentials, and stores the credentials in the variable named $MyCred. 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 retrieve the configuration for the target computer, and passes the output to the Set-PcsvDeviceBootConfiguration cmdlet by using the pipeline operator.

PS C:\> $MyCred = Get-Credential
PS C:\> Get-PCSVDevice -TargetAddress 10.1.12.43 -ManagementProtocol WSMan -Credential $MyCred -UseSSL | Set-PcsvDeviceBootConfiguration -OneTimeBootSource "CIM:CD/DVD:1"

Rubriques connexes

Get-PcsvDevice