Configuration Manager 2010 版的 Cmdlet 程式庫變更 (英文)

適用於:Configuration Manager (最新分支)

這些版本資訊摘要說明2010版中設定管理員 Cmdlet 程式庫的變更。

從2010版開始,設定管理員 PowerShell Cmdlet 程式庫現在提供 PowerShell 7 的支援。 如需詳細資訊,請參閱 PowerShell 第7版支援

注意

設定管理員最新分支2002版是這些變更的基準。 如需詳細資訊,請參閱 2006 版的設定管理員 Cmdlet 程式庫變更

雲端管理閘道

現在有更多客戶管理遠端裝置,此版本包含數個全新且改良的 Windows PowerShell Cmdlet,適用于 雲端管理閘道 (CMG) 。 您可以使用這些 Cmdlet 來自動建立、設定及管理 CMG 服務和 Azure Active Directory (Azure AD) 需求。

注意

雖然有些新的 Cmdlet 可搭配其他 Azure 服務運作,但只會使用 [雲端管理] 連線進行測試,以支援 CMG。

例如,Azure 系統管理員會先在 Azure Active Directory (Azure AD) 中建立兩個必要的應用程式。 然後撰寫指令碼,以使用下列 Cmdlet 來部署 CMG:

  1. Import-CMAADServerApplication:在 Configuration Manager 中建立 Azure AD 伺服器應用程式定義。
  2. Import-CMAADClientApplication:在 Configuration Manager 中建立 Azure AD 用戶端應用程式定義。
  3. 使用 Get-CMAADApplication 來取得應用程式物件,然後傳遞至 New-CMCloudManagementAzureService,以在 Configuration Manager 中建立 Azure 服務連線。
  4. New-CMCloudManagementGateway:在 Azure 中建立 CMG 服務。
  5. Add-CMCloudManagementGatewayConnectionPoint:建立 CMG 連接點站台系統。

適用于 CMG 的新 Cmdlet

已更新 CMG 的 Cmdlet

下列現有的 Cmdlet 有明顯改進。 如需詳細資訊,請參閱下列版本資訊:

適用于 CMG 的現有 Cmdlet

您可繼續使用下列現有的 CMG Cmdlet:

新的 Cmdlet

應用程式管理

集合管理

Windows 10 版本升級

Microsoft Edge 瀏覽器設定檔

商務用 OneDrive 設定檔

已淘汰和移除的 Cmdlet

下列設定管理員混合式環境的 Cmdlet 已無法再使用:

  • Add-CMAndroidDeploymentType
  • Add-CMGooglePlayDeploymentType
  • Add-CMIosAppStoreDeploymentType
  • Add-CMIosDeploymentType
  • Set-CMAndroidDeploymentType
  • Set-CMGooglePlayDeploymentType
  • Set-CMIosAppStoreDeploymentType
  • Set-CMIosDeploymentType

如需詳細資訊,請參閱 混合式 MDM 發生什麼事?

下列 Cmdlet 已被取代:

已知問題

Cmdlet 變更

此版本中的現有 Cmdlet 已進行下列變更。 變更可能是新功能、bug 修正或淘汰。 某些變更可能會中斷。 如果您使用此區段中所列的其中一個 Cmdlet 或功能區域,請仔細檢查變更,以瞭解它們可能會如何影響您的使用方式。

Add-CMComplianceSettingRegistryKeyValue

如需詳細資訊,請參閱 CMComplianceSettingRegistryKeyValue

非中斷性變更

參數 ExpectedValue 可以接受空白值。

Add-CMDistributionPoint

如需詳細資訊,請參閱 Add-CMDistributionPoint

已修正的錯誤 (Bug)

已修正發佈點建立的問題。

Add-CMDeviceCollectionDirectMembershipRule

如需詳細資訊,請參閱 CMDeviceCollectionDirectMembershipRule

已修正的錯誤 (Bug)

已修正重複裝置編號檢查的問題。

Add-CMManagementPoint

如需詳細資訊,請參閱 CMManagementPoint

已修正的錯誤 (Bug)

已修正雲端管理閘道支援的問題。

Add-CMPassiveSite

如需詳細資訊,請參閱 CMPassiveSite

已修正的錯誤 (Bug)

已修正階層中被動網站的問題。

Add-CMTaskSequenceStep

如需詳細資訊,請參閱 CMTaskSequenceStep

已修正的錯誤 (Bug)

修正使用包含大型腳本的多個 PowerShell 步驟時,原則大小的問題。

Add-CMWindowsAppxDeploymentType

如需詳細資訊,請參閱 CMWindowsAppxDeploymentType

非中斷性變更

已新增函數以支援 MSIX。

Approve-CMDevice

For more information, see Approve-CMDevice.

非中斷性變更

修正使用 CMDevice 時的問題。

Enable-CMSiteFeature

如需詳細資訊,請參閱 啟用-CMSiteFeature

非中斷性變更

已新增旗標以支援雲端功能。

Get-CMScript

如需詳細資訊,請參閱 CMScript

非中斷性變更

新增了新的參數 ScriptGuid ,以支援依腳本 GUID 進行查詢。

Get-CMSiteFeature

如需詳細資訊,請參閱 CMSiteFeature

非中斷性變更

已新增旗標以支援雲端功能。

Get-CMSoftwareUpdate

如需詳細資訊,請參閱 CMSoftwareUpdate

非中斷性變更

已新增參數 廠商 ,以指定軟體更新的來源。

範例︰

Get-CMSoftwareUpdate -Name $Update -Vendor "Microsoft"

Get-CMStatusMessageQuery

如需詳細資訊,請參閱 CMStatusMessageQuery

已修正的錯誤 (Bug)

已修正參數 ShowMessage 的問題。

Import-CMDriver

如需詳細資訊,請參閱 CMDriver

非中斷性變更

新增了新的參數 AdministrativeCategoryName ,以指定驅動程式類別目錄的名稱。

範例︰

Import-CMDriver -UncFileLocation $DriverFolder -ImportFolder -ImportDuplicateDriverOption AppendCategory -AdministrativeCategory "Video drivers"

Invoke-CMAnalyzePackage

如需詳細資訊,請參閱 CMAnalyzePackage

重大變更

已移除 套件 參數。 使用管線傳送封裝物件,或使用 InputObject 參數。

非中斷性變更

已新增管線支援和 InputObject 參數。

範例︰

$pkg | Invoke-CMAnalyzePackage

Invoke-CMClientAction

如需詳細資訊,請參閱 CMClientAction

已修正的錯誤 (Bug)

修正參數 集合 的管線問題。

範例︰

Get-CMCollection -Name "deviceCol1" | Invoke-CMClientAction -ActionType ClientNotificationRequestUsersPolicyNow

Invoke-CMConvertPackage

如需詳細資訊,請參閱 CMConvertPackage

重大變更

已移除 套件 參數。 使用管線傳送封裝物件,或使用 InputObject 參數。

非中斷性變更

已新增管線支援和 InputObject 參數。

範例︰

$pkg | Invoke-CMConvertPackage

Invoke-CMReport

如需詳細資訊,請參閱 CMReport

已修正的錯誤 (Bug)

已修正參數 路徑 的問題。

Invoke-CMScript

如需詳細資訊,請參閱 CMScript

非中斷性變更

加入參數 ScriptParameter ,以將參數傳遞至目標腳本。

範例︰

$Hash = @{"FolderName"="c:\test\test1"; "FileName"="test2"}

Invoke-CMScript -ScriptGuid $scriptGuid -Device (Get-CMDevice -Name $targetPCName) -ScriptParameter $Hash

New-CMBMSClientConfigureCheckIntervalPolicy

如需詳細資訊,請參閱 CMBMSClientConfigureCheckIntervalPolicy

已修正的錯誤 (Bug)

已修正建立新原則設定實例時的問題。

New-CMBoundary

如需詳細資訊,請參閱 CMBoundary

非中斷性變更

已在 BoundaryType 參數中新增 VPN 選項。

New-CMBootableMedia

如需詳細資訊,請參閱 CMBootableMedia

非中斷性變更

加入參數 SiteCode

New-CMCloudManagementGateway

如需詳細資訊,請參閱 New-CMCloudManagementGateway

非中斷性變更

以下是新的參數:

  • CARootCert
  • EnableCloudDPFunction
  • EnableStorageQuota
  • EnableTrafficOut
  • EnforceProtocol
  • Force
  • GroupName
  • IsUsingExistingGroup
  • ServerAppClientID
  • ServiceCertPassword
  • ServiceCertPath
  • ServiceName
  • StorageCriticalPct
  • StorageQuotaGB
  • StorageWarningPct
  • TrafficOutStopService

以下是更新的參數:

  • CheckClientCertRevocation
  • EnvironmentSetting
  • 區域
  • SubscriptionId
  • TrafficCriticalPct
  • TrafficWarningPct

重大變更

此 Cmdlet 會移除下列參數:

  • GovernmentSubscription
  • ManagementCertificatePassword
  • ManagementCertificatePath
  • PassThru
  • RootCertificatePath
  • ServiceCertificatePassword
  • ServiceCertificatePath
  • ServiceCName

New-CMCoManagementPolicy

如需詳細資訊,請參閱 CMCoManagementPolicy

非中斷性變更

已新增多會話適用性

已新增 ARM64 適用性

New-CMComplianceRuleFileFolderDate

如需詳細資訊,請參閱 CMComplianceRuleFileFolderDate

非中斷性變更

已調整 Cmdlet 邏輯,以處理來自 修改建立 參數的值,以配合其他 Cmdlet。

New-CMComplianceRuleFileFolderSimple

如需詳細資訊,請參閱 CMComplianceRuleFileFolderSimple

重大變更

將參數 PropertyType 的類型從 FileFolderProperty 變更為 SimpleFileFolderProperty 類型。

New-CMDetectionClauseDirectory

如需詳細資訊,請參閱 CMDetectionClauseDirectory

重大變更

將參數 ExpressionOperator 的類型從 RuleExpressionOperator 變更為 FileFolderRuleExpressionOperator 類型。

New-CMDetectionClauseFile

如需詳細資訊,請參閱 CMDetectionClauseFile

重大變更

將參數 ExpressionOperator 的類型從 RuleExpressionOperator 變更為 FileFolderRuleExpressionOperator 類型。

New-CMDetectionClauseMacBundle

如需詳細資訊,請參閱 CMDetectionClauseMacBundle

重大變更

將參數 ExpressionOperator 的類型從 RuleExpressionOperator 變更為 MacRuleExpressionOperator 類型。

已修正的錯誤 (Bug)

已修正參數 PropertyType 的問題。

New-CMDetectionClauseMacPackage

如需詳細資訊,請參閱 CMDetectionClauseMacPackage

重大變更

將參數 ExpressionOperator 的類型從 RuleExpressionOperator 變更為 MacRuleExpressionOperator 類型。

New-CMDetectionClauseRegistryKeyValue

如需詳細資訊,請參閱 CMDetectionClauseRegistryKeyValue

重大變更

將參數 ExpressionOperator 的類型從 RuleExpressionOperator 變更為 RegistryValueRuleExpressionOperator 類型。

New-CMDetectionClauseWindowsInstaller

如需詳細資訊,請參閱 CMDetectionClauseWindowsInstaller

重大變更

將參數 ExpressionOperator 的類型從 RuleExpressionOperator 變更為 WindowsInstallerRuleExpressionOperator 類型。

New-CMDriverPackage

如需詳細資訊,請參閱 CMDriverPackage

已修正的錯誤 (Bug)

已修正參數 DriverModel 的問題。

新 CM * PhasedDeployment

如需詳細資訊,請參閱下列文章:

已修正的錯誤 (Bug)

已修正參數 WhatIf 的問題。

非中斷性變更

已新增重複階段名稱的驗證。

New-CMPrestageMedia

如需詳細資訊,請參閱 CMPrestageMedia

非中斷性變更

加入參數 SiteCode

New-CMProgram

如需詳細資訊,請參閱 CMProgram

重大變更

將型別重新命名為 RenameWithUnc RunWithUnc DriveMode 參數。

New-CMSoftwareUpdateDeployment

如需詳細資訊,請參閱 CMSoftwareUpdateDeployment

非中斷性變更

已為未下載的軟體更新新增參數 DeployWithNoPackage

New-CMStandaloneMedia

如需詳細資訊,請參閱 CMStandaloneMedia

已修正的錯誤 (Bug)

已修正參數 PrestartPackage 的問題

New-CMTaskSequence

如需詳細資訊,請參閱 CMTaskSequence

已修正的錯誤 (Bug)

修正當您使用包含大型腳本的多個 PowerShell 步驟時,原則大小的問題。

New-CMTaskSequenceDeployment

如需詳細資訊,請參閱 CMTaskSequenceDeployment

已修正的錯誤 (Bug)

已修正參數 AllowFallback 的問題。

非中斷性變更

已新增參數 排程 的驗證,以避免現有指派產生重複的值。

New-CMTaskSequenceMedia

如需詳細資訊,請參閱 CMTaskSequenceMedia

非中斷性變更

將媒體建立期間的時間變更為三天。

New-CMTSPartitionSetting

如需詳細資訊,請參閱 CMTSPartitionSetting

已修正的錯誤 (Bug)

已修正參數 EnableQuickFormat 的問題。

New-CMTSStepEnableBitLocker (英文)

如需詳細資訊,請參閱 CMTSStepEnableBitLocker

已修正的錯誤 (Bug)

已修正使用者指定加密方法的問題。

New-CMTSStepOfflineEnableBitLocker (英文)

如需詳細資訊,請參閱 CMTSStepOfflineEnableBitLocker

已修正的錯誤 (Bug)

已修正使用者指定加密方法的問題。

New-CMTSStepPreStartCheck

如需詳細資訊,請參閱 CMTSStepPreStartCheck

已修正的錯誤 (Bug)

修正新的檢查準備步驟的問題。

已修正參數 OSLanguageId 的問題。

非中斷性變更

新增 UEFI 檢查的新參數 CheckUefi

Remove-CMTaskSequenceGroup

For more information, see Remove-CMTaskSequenceGroup.

已修正的錯誤 (Bug)

修正當您使用包含大型腳本的多個 PowerShell 步驟時,原則大小的問題。

設定-CM * PhasedDeployment

如需詳細資訊,請參閱下列文章:

已修正的錯誤 (Bug)

已修正參數 WhatIf 的問題。

Set-CMBoundary

For more information, see Set-CMBoundary.

非中斷性變更

VPNBoundaryType 中新增選項。

Set-CMClientSettingComputerRestart

For more information, see Set-CMClientSettingComputerRestart.

非中斷性變更

新增了新的參數 NoRebootEnforcement

Set-CMClientSettingSoftwareUpdate

For more information, see Set-CMClientSettingSoftwareUpdate.

非中斷性變更

新增的參數:

  • EnableInstallation
  • System.threading.threadpriority>
  • EnableDynamicUpdate

範例︰

Set-CMClientSettingSoftwareUpdate -InputObject $testsetting -Enable $true -ScanSchedule $Sch1 -DeploymentEvaluationSchedule $Sch2 -BatchingTimeout 3 -TimeUnit Days -EnforceMandatory $true -Office365ManagementType $false -EnableThirdPartyUpdates $true -EnableDeltaDownload $true -EnableInstallation $true -ThreadPriority Normal -EnableDynamicUpdate $true

Set-CMCloudManagementGateway

For more information, see Set-CMCloudManagementGateway.

非中斷性變更

以下是新的參數:

  • CARootCert
  • EnableCloudDPFunction
  • EnableStorageQuota
  • EnableTrafficOut
  • EnforceProtocol
  • RemoveCertThumbprints
  • StorageCriticalPct
  • StorageQuotaGB
  • StorageWarningPct
  • TrafficOutStopService
  • VMInstanceCount

重大變更

此 Cmdlet 會移除下列參數:

  • VMInstancesCount

Set-CMDiscoveryMethod

For more information, see Set-CMDiscoveryMethod.

已修正的錯誤 (Bug)

已修正參數 AddGroupDiscoveryScope 的問題。

Set-CMDistributionPoint

如需詳細資訊,請參閱 Set-CMDistributionPoint

非中斷性變更

已新增參數以支援 Microsoft 網內快取:

  • EnableDoinc
  • DiskSpaceUnit
  • DiskSpaceDoinc
  • LocalDriveDoinc
  • RetainDoincCache
  • AgreeDoincLicense

範例︰

$dp | Set-CMDistributionPoint -EnableDoinc $true -AgreeDoincLicense $true

$dp | Set-CMDistributionPoint -RetainDoincCache $true -EnableDoinc $true -AgreeDoincLicense $true

$dp | Set-CMDistributionPoint -LocalDriveDoinc "Z:" -DiskSpaceDoinc 9000 -DiskSpaceUnit GB

Set-CMDriverPackage

For more information, see Set-CMDriverPackage.

已修正的錯誤 (Bug)

已修正參數 DriverModel 的問題。

Set-CMManagementPoint

For more information, see Set-CMManagementPoint.

已修正的錯誤 (Bug)

已修正雲端管理閘道支援的問題。

Set-CMProgram

For more information, see Set-CMProgram.

重大變更

將型別重新命名為 RenameWithUnc RunWithUnc DriveMode 參數。

Set-CMSiteMaintenanceTask

For more information, see Set-CMSiteMaintenanceTask.

非中斷性變更

已新增下列新參數,以針對具有遠端 SMS 提供者的環境設定 網站備份目的地SQL 備份目的地

  • SiteBackupPath
  • SqlBackupPath

範例︰

Set-CMSiteMaintenanceTask -Name $TaskName  -SiteBackupPath "c:\site-backup" -SqlBackupPath "c:\sql-backup" -BeginTime (Get-Date) -DaysOfWeek Sunday,Monday -EnableAlert $true -Enabled $true

Set-CMSoftwareUpdateAutoDeploymentRule

For more information, see Set-CMSoftwareUpdateAutoDeploymentRule.

已修正的錯誤 (Bug)

已修正 CMSoftwareUpdateAutoDeploymentRule with Fast 選項的輸入物件問題。

Set-CMSoftwareUpdateDeploymentPackage

For more information, see Set-CMSoftwareUpdateDeploymentPackage.

已修正的錯誤 (Bug)

已修正參數 RemoveExpiredRemoveSuperceded 的問題。

Set-CMSoftwareUpdateGroup

For more information, see Set-CMSoftwareUpdateGroup.

已修正的錯誤 (Bug)

已修正新增未下載軟體更新的問題。

Set-CMStatusFilterRule

For more information, see Set-CMStatusFilterRule.

已修正的錯誤 (Bug)

已修正 Name 參數的問題,以確保其包含 CMStatusFilterRule

Set-CMTaskSequenceDeployment

For more information, see Set-CMTaskSequenceDeployment.

已修正的錯誤 (Bug)

已修正參數 ScheduleEvent 的問題。

已修正參數 AllowFallback 的問題。

非中斷性變更

已新增參數 排程 的驗證,以避免現有指派產生重複的值。

已新增參數以設定排程:

  • ClearSchedule
  • RemoveSchedule
  • AddSchedule

已新增參數以設定 ScheduleEvent:

  • ClearScheduleEvent
  • RemoveScheduleEvent
  • AddScheduleEvent

範例︰

$ReferenceDeployment | Set-CMTaskSequenceDeployment -AddSchedule $schedule1, $schedule2

$ReferenceDeployment | Set-CMTaskSequenceDeployment -AddScheduleEvent LogOn, LogOff

Set-CMTSStep*

已修正的錯誤 (Bug)

修正當您使用包含大型腳本的多個 PowerShell 步驟時,原則大小的問題。

Set-CMTSStepEnableBitLocker (英文)

For more information, see Set-CMTSStepEnableBitLocker.

已修正的錯誤 (Bug)

已修正使用者指定加密方法的問題。

Set-CMTSStepOfflineEnableBitLocker (英文)

For more information, see Set-CMTSStepOfflineEnableBitLocker.

已修正的錯誤 (Bug)

已修正使用者指定加密方法的問題。

Set-CMTSStepPreStartCheck

For more information, see Set-CMTSStepPreStartCheck.

非中斷性變更

新增 UEFI 檢查的新參數:、 CheckUefi

Set-CMWindowsAppxDeploymentType

For more information, see Set-CMWindowsAppxDeploymentType.

非中斷性變更

已新增函數以支援 MSIX。

Start-CMCloudManagementGateway

For more information, see Start-CMCloudManagementGateway.

已修正的錯誤 (Bug)

已更正 CMG 狀態的驗證。

Start-CMContentDistribution

For more information, see Start-CMContentDistribution.

非中斷性變更

已新增參數 DeploymentPackageIdDeploymentPackageName 的別名,以進一步瞭解。

Stop-CMCloudManagementGateway

如需詳細資訊,請參閱 CMCloudManagementGateway

已修正的錯誤 (Bug)

已更正 CMG 狀態的驗證。

如何提供意見反應或報告問題

本文所述的許多修正和改進都是您的意見反應的結果。

若要傳送意見反應,請使用設定管理員主控台。 如需詳細資訊,請參閱 PowerShell 的意見反應。

若要提交新的功能要求,請參閱 UserVoice 上的 PowerShell 設定管理員群組。