共用方式為


Set-CMDriver

變更設備磁碟機的設定。

語法

Set-CMDriver
   [-AddAdministrativeCategory <IResultObject[]>]
   [-AddBootImagePackage <IResultObject[]>]
   [-AddDriverPackage <IResultObject[]>]
   [-AddSupportedPlatformName <String[]>]
   [-AdministrativeCategory <IResultObject[]>]
   [-ClearAdministrativeCategory]
   [-ClearSupportedPlatformName]
   [-Description <String>]
   [-DriverSource <String>]
   [-EnableAndAllowInstall <Boolean>]
   -InputObject <IResultObject>
   [-NewName <String>]
   [-PassThru]
   [-RemoveAdministrativeCategory <IResultObject[]>]
   [-RemoveBootImagePackage <IResultObject[]>]
   [-RemoveDriverPackage <IResultObject[]>]
   [-RemoveSupportedPlatformName <String[]>]
   [-RunOnAnyPlatform]
   [-SupportedPlatformName <String[]>]
   [-UpdateBootImageDistributionPoint <Boolean>]
   [-UpdateDriverDistributionPoint <Boolean>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriver
   [-AddAdministrativeCategory <IResultObject[]>]
   [-AddBootImagePackage <IResultObject[]>]
   [-AddDriverPackage <IResultObject[]>]
   [-AddSupportedPlatformName <String[]>]
   [-AdministrativeCategory <IResultObject[]>]
   [-ClearAdministrativeCategory]
   [-ClearSupportedPlatformName]
   [-Description <String>]
   [-DriverSource <String>]
   [-EnableAndAllowInstall <Boolean>]
   -Id <String>
   [-NewName <String>]
   [-PassThru]
   [-RemoveAdministrativeCategory <IResultObject[]>]
   [-RemoveBootImagePackage <IResultObject[]>]
   [-RemoveDriverPackage <IResultObject[]>]
   [-RemoveSupportedPlatformName <String[]>]
   [-RunOnAnyPlatform]
   [-SupportedPlatformName <String[]>]
   [-UpdateBootImageDistributionPoint <Boolean>]
   [-UpdateDriverDistributionPoint <Boolean>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMDriver
   [-AddAdministrativeCategory <IResultObject[]>]
   [-AddBootImagePackage <IResultObject[]>]
   [-AddDriverPackage <IResultObject[]>]
   [-AddSupportedPlatformName <String[]>]
   [-AdministrativeCategory <IResultObject[]>]
   [-ClearAdministrativeCategory]
   [-ClearSupportedPlatformName]
   [-Description <String>]
   [-DriverSource <String>]
   [-EnableAndAllowInstall <Boolean>]
   -Name <String>
   [-NewName <String>]
   [-PassThru]
   [-RemoveAdministrativeCategory <IResultObject[]>]
   [-RemoveBootImagePackage <IResultObject[]>]
   [-RemoveDriverPackage <IResultObject[]>]
   [-RemoveSupportedPlatformName <String[]>]
   [-RunOnAnyPlatform]
   [-SupportedPlatformName <String[]>]
   [-UpdateBootImageDistributionPoint <Boolean>]
   [-UpdateDriverDistributionPoint <Boolean>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-CMDriver Cmdlet會變更驅動程式類別目錄中設備磁碟機的設定。

注意事項

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

範例

範例 1:修改驅動程式

PS XYZ:\> $Driver = Get-CMDriver -Name "cdrom.sys"
PS XYZ:\> Set-CMDriver -InputObject $Driver -NewName "testDriver" -Description "Test configuration" -EnableAndAllowInstall $True -RunOnAnyPlatform $True

第一個命令會使用 Get-CMDriver Cmdlet 取得名為 cdrom.sys 的設備磁碟機。 命令會將該物件儲存在$Driver變數中。

第二個命令會重新命名驅動程式,並新增描述。 命令會指定 EnableAndAllowInstallRunOnAnyPlatform 參數的值。

範例 2:使用管線修改驅動程式

PS XYZ:\> Get-CMDriver -Name "cdrom.sys" | Set-CMDriver -NewName testDriver -Description description -EnableAndAllowInstall $True -RunOnAnyPlatform $True

此命令會取得名為 cdrom.sys 的驅動程式,然後使用管線運算子將它傳遞至目前的 Cmdlet。 目前的 Cmdlet 會重新命名驅動程式,並新增描述。 命令會指定 EnableAndAllowInstallRunOnAnyPlatform 的值。

參數

-AddAdministrativeCategory

指定這個 Cmdlet 新增至驅動程式的系統管理類別目錄物件陣列。 若要取得系統管理類別物件,請使用 Get-CMCategory Cmdlet。

類型:IResultObject[]
別名:AddAdministrativeCategories
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AddBootImagePackage

指定開機映射物件的陣列。 使用此參數來指定可安裝設備磁碟機的開機映射。 若要取得開機映射物件,請使用 Get-CMBootImage Cmdlet。

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

-AddDriverPackage

指定驅動程式套件物件的陣列。 使用此參數來指定Configuration Manager用來散發設備磁碟機的驅動程式套件。 若要取得驅動程式套件物件,請使用 Get-CMDriverPackage Cmdlet。

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

-AddSupportedPlatformName

{{ Fill AddSupportedPlatformName Description }}

類型:String[]
別名:AddSupportedPlatformNames
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AdministrativeCategory

指定系統管理類別的陣列。 將設備磁碟機指派給系統管理類別以進行篩選,例如桌面或筆記本類別。

若要取得系統管理類別物件,請使用 Get-CMCategory Cmdlet。

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

-ClearAdministrativeCategory

表示此 Cmdlet 會從驅動程式中移除所有系統管理類別物件。

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

-ClearSupportedPlatformName

{{ Fill ClearSupportedPlatformName Description }}

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

-Confirm

執行 Cmdlet 之前提示您確認。

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

-Description

指定設備磁碟機的描述。

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

-DisableWildcardHandling

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

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

-DriverSource

指定驅動程式套件來源位置。 當您建立驅動程式套件時,套件的來源位置必須指向另一個驅動程式套件未使用的空白網路共用。

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

-EnableAndAllowInstall

指出Configuration Manager是否啟用驅動程式,並允許電腦安裝驅動程式。

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

-ForceWildcardHandling

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

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

-Id

指定設備磁碟機的識別碼。

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

-InputObject

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

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

-Name

指定設備磁碟機的名稱。

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

-NewName

指定設備磁碟機的新名稱。

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

-PassThru

傳回代表驅動程式的 物件。 根據預設,這個 Cmdlet 不會產生任何輸出。

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

-RemoveAdministrativeCategory

指定此 Cmdlet 從驅動程式中移除的系統管理類別目錄物件陣列。 若要取得系統管理類別物件,請使用 Get-CMCategory

類型:IResultObject[]
別名:RemoveAdministrativeCategories
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RemoveBootImagePackage

指定開機映射物件的陣列。 使用此參數來移除可安裝設備磁碟機的開機映射。 若要取得開機映射物件,請使用 Get-CMBootImage Cmdlet。

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

-RemoveDriverPackage

指定驅動程式套件物件的陣列。 使用此參數來移除Configuration Manager用來散發設備磁碟機的驅動程式套件。 若要取得驅動程式套件物件,請使用 Get-CMDriverPackage Cmdlet。

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

-RemoveSupportedPlatformName

{{ Fill RemoveSupportedPlatformName Description }}

類型:String[]
別名:RemoveSupportedPlatformNames
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-RunOnAnyPlatform

表示設備磁碟機可以在所有平臺上執行。

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

-SupportedPlatformName

指定設備磁碟機可以執行的平臺名稱陣列。

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

-UpdateBootImageDistributionPoint

指出Configuration Manager是否更新其發佈點上的開機映射,以新增驅動程式。

類型:Boolean
別名:UpdateDistributionPointsForBootImagePackage, UpdateBootImageDistributionPoints
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-UpdateDriverDistributionPoint

指出當設備磁碟機新增至驅動程式套件時,Configuration Manager更新發佈點。

類型:Boolean
別名:UpdateDistributionPointsForDriverPackage, UpdateDriverDistributionPoints
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

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

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

輸入

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

輸出

System.Object