Set-PcsvDeviceBootConfiguration

Set-PcsvDeviceBootConfiguration

Modifies the boot configuration on the remote hardware device.

语法

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

详细说明

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.

参数

-AsJob

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

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). 此参数可接受的值如下:

-- Basic
-- Digest
-- Default

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

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

false

-CimSession<CimSession[]>

在远程会话中或在远程计算机上运行 cmdlet。输入计算机名称或会话对象,例如 New-CimSessionGet-CimSession cmdlet 的输出。默认为本地计算机上的当前会话。

别名

Session

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

是否为必需?

true

位置?

3

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

是否为必需?

true

位置?

named

默认值

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-ManagementProtocol<ManagementProtocol>

Specifies a management protocol used to communicate with a device. 此参数可接受的值如下:

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

别名

MP

是否为必需?

true

位置?

4

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

OT,NextBoot

是否为必需?

true

位置?

2002

默认值

是否接受管道输入?

false

是否接受通配符?

false

-PassThru

返回一个表示你正在处理的项的对象。默认情况下,此 cmdlet 将不产生任何输出。

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

是否为必需?

false

位置?

5

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

CN,ComputerName,IpAddress

是否为必需?

true

位置?

2

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

false

-ThrottleLimit<Int32>

指定可建立的用于运行此 cmdlet 的并发操作的最大数目。如果省略了此参数或输入了值 0,那么 Windows PowerShell® 将基于正在计算机上运行的 CIM cmdlet 的数目,计算 cmdlet 的最佳中止值。中止值仅适用于当前 cmdlet,而不适用于会话或计算机。

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

false

-Confirm

运行 cmdlet 之前提示你进行确认。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

-WhatIf

显示如果运行 cmdlet 则会发生什么情况。cmdlet 未运行。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持通用参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

输入

输入类型是指可通过管道传送给 cmdlet 的对象的类型。

输出

输出类型是 cmdlet 所发出对象的类型。

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

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

示例

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"

相关主题

Get-PcsvDevice