Set-CMDriverBootImage

將驅動程式新增至開機映射,或從開機映像中移除驅動程式。

語法

Set-CMDriverBootImage
   -BootImageId <String>
   -DriverId <Int32>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImage <IResultObject>
   -DriverId <Int32>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImage <IResultObject>
   -DriverName <String>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImage <IResultObject>
   -Driver <IResultObject>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImageId <String>
   -DriverName <String>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImageId <String>
   -Driver <IResultObject>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImageName <String>
   -DriverId <Int32>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImageName <String>
   -DriverName <String>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriverBootImage
   -BootImageName <String>
   -Driver <IResultObject>
   [-PassThru]
   -SetDriveBootImageAction <SetDriveBootImageActionType>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-CMDriverBootImage Cmdlet 會將驅動程式新增至開機映射,或從開機映射中移除驅動程式。 您可以將已匯入 Configuration Manager 驅動程式類別目錄的 Windows 設備驅動器新增至一或多個開機映像。 您應該只將大量儲存設備驅動器和網路適配器設備驅動器新增至開機映像,因為不需要其他類型的驅動程式,而且會增加開機映像的大小。

注意事項

從 Configuration Manager 月臺磁碟驅動器執行 Configuration Manager Cmdlet,例如 PS XYZ:\>。 如需詳細資訊,請 參閱開始使用

範例

範例 1:將驅動程式新增至開機映射

PS XYZ:\> Set-CMDriverBootImage -SetDriveBootImageAction AddDriverToBootImage -DriverName "Adaptec Embedded SCSI HostRAID Controller" -BootImageName "Boot image (x64)"

此命令會將名為 Adaptec Embedded SCSI HostRAID Controller 的驅動程式新增至名為開機映像的開機映射, (x64) 。

範例 2:從開機映射移除驅動程式

PS XYZ:\> Set-CMDriverBootImage -SetDriveBootImageAction RemoveDriverFromBootImage -DriverName "Adaptec SCSI HostRAID Management Processor Device" -BootImageName "Boot image (x64)"

此命令會從名為開機映射的開機映像中移除名為 Adaptec SCSI HostRAID Management Processor Device 的驅動程式, (x64) 。

參數

-BootImage

指定 CMBootImage 物件。 若要取得 CMBootImage 物件,請使用 Get-CMBootImage Cmdlet。

類型:IResultObject
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-BootImageId

指定開機映像的識別碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-BootImageName

指定開機映像的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

-DisableWildcardHandling

此參數會將通配符視為常值字元值。 您無法將其與 ForceWildcardHandling 結合。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Driver

指定驅動程序物件。 若要取得 CMDriver 物件,請使用 Get-CMDriver Cmdlet。

類型:IResultObject
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-DriverId

指定驅動程式的識別碼。

類型:Int32
別名:Id, CIId, CI_ID
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-DriverName

指定驅動程序的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ForceWildcardHandling

此參數會處理通配符,並可能導致非預期的行為 (不建議) 。 您無法將其與 DisableWildcardHandling 結合。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-PassThru

新增此參數以傳回 物件,代表您正在使用的專案。 根據預設,此 Cmdlet 可能不會產生任何輸出。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SetDriveBootImageAction

指定開機映像動作。 此參數可接受的值為:

  • AddDriverToBootImage
  • RemoveDriverFromBootImage
類型:SetDriveBootImageActionType
接受的值:AddDriverToBootImage, RemoveDriverFromBootImage
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 時會發生什麼情況。 Cmdlet 不會執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:False
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

輸出

System.Object