簡體   English   中英

SCCM Powershell 使用 Set-CMTaskSequence 編輯 TaskSequence 設置

[英]SCCM Powershell edit TaskSequence settings using Set-CMTaskSequence

嘗試更改我的 TS 支持的操作系統以便在軟件中心隱藏/顯示它。

導入 ConfigurationManager.psd1 模塊並根據Set-CMTaskSequence文檔,我應該能夠指定應該支持的操作系統:

在此處輸入圖像描述

如果我手動設置一個特定的操作系統,然后想撤消以下代碼,請將我的 TS 改回“在任何平台上運行”

Set-CMTaskSequence -TaskSequenceId XYZ00023 -RunOnAnyPlatform

我當前嘗試設置指定操作系統的代碼出錯:

在此處輸入圖像描述

Set-CMTaskSequence -TaskSequenceId XYZ00023 -AddSupportedOperatingSystemPlatform (Get-CMSupportedPlatform | Where-Object {$_.CI_UniqueID -eq 'Windows/All_x64_Windows_8.1'})

它與我嘗試設置的操作系統無關,每次都會出現相同的錯誤。

任何人都嘗試並成功地使用 Powershell 更改了此值並且可以協助如何?

如果您使用-Verbose ,則會顯示一條警告: WARNING: Unsupported platform 'All x64 Windows 8.1 devices' for task sequence.

在這里找到解決方案: https://blog.adexis.com.au/2019/06/14/sccm-windows-10-no-longer-ticked-as-deployment-target-os-for-packages-and-tss -升級后到當前分支/

您應該使用用client表示的操作系統:

$os = Get-CMSupportedPlatform -Fast | Where-Object { $_.CI_UniqueID -eq "Windows/All_x64_Windows_8.1_Client" }
Set-CMTaskSequence -TaskSequenceName "XYZ00023" -AddSupportedOperatingSystemPlatform $os -Verbose

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM