Trying to change what OS my TS supports in order to hide/show it in Software Center.
Importing ConfigurationManager.psd1 module and according to documentation for Set-CMTaskSequence I should be able to specify which OS that should be supported:
If I manually set a specific OS and then want to undo following code change my TS back to "Run on any platform":
Set-CMTaskSequence -TaskSequenceId XYZ00023 -RunOnAnyPlatform
The code i'm currently trying to set specified OS gives error:
Set-CMTaskSequence -TaskSequenceId XYZ00023 -AddSupportedOperatingSystemPlatform (Get-CMSupportedPlatform | Where-Object {$_.CI_UniqueID -eq 'Windows/All_x64_Windows_8.1'})
It doesn't mather which OS I'm trying to set same error occur everytime.
Anyone tried and successfully changed this value using Powershell and can assist in how to?
If you use -Verbose
a warning is shown: WARNING: Unsupported platform 'All x64 Windows 8.1 devices' for task sequence.
Found the solution here: https://blog.adexis.com.au/2019/06/14/sccm-windows-10-no-longer-ticked-as-deployment-target-os-for-packages-and-tss-after-upgrade-to-current-branch/
You should use the OS denoted with client
:
$os = Get-CMSupportedPlatform -Fast | Where-Object { $_.CI_UniqueID -eq "Windows/All_x64_Windows_8.1_Client" }
Set-CMTaskSequence -TaskSequenceName "XYZ00023" -AddSupportedOperatingSystemPlatform $os -Verbose