Set-CMCISupportedPlatform
Configure the supported platforms for a configuration item.
Syntax
Set-CMCISupportedPlatform
[-InputObject] <PSObject>
[-DefineVersionManually]
[-VersionMajor <Int32>]
[-VersionMinor <Int32>]
[-VersionBuild <Int32>]
[-ServicePackMajor <Int32>]
[-ServicePackMinor <Int32>]
[-Is64BitRequired <Boolean>]
[-AddSupportedPlatform <IResultObject[]>]
[-RemoveSupportedPlatform <IResultObject[]>]
[-PassThru]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Use this cmdlet to configure the supported platforms for a configuration item. For more information, see Create configuration items in Configuration Manager.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1: Set platform for configuration item
This example removes two OS platforms for macOS, and adds two new platforms.
$mac_ci = Get-CMConfigurationItem -Name "Mac CI"
$mac_platform1 = Get-CMSupportedPlatform -Name "Mac OS X 10.8"
$mac_platform2 = Get-CMSupportedPlatform -Name "Mac OS X 10.9"
$mac_platforms = $mac_platform1,$mac_platform2
$mac_platform3 = Get-CMSupportedPlatform -Name "Mac OS X 10.7"
$mac_platform4 = Get-CMSupportedPlatform -Name "Mac OS X 10.6"
$mac_platforms2 = $mac_platform3,$mac_platform4
Set-CMCISupportedPlatform -InputObject $mac_ci -AddSupportedPlatform $mac_platforms -RemoveSupportedPlatform $mac_platforms2
Parameters
-AddSupportedPlatform
Specify one or more supported platform objects to add to the configuration item. To get this object, use the Get-CMSupportedPlatform cmdlet.
Type: | IResultObject[] |
Aliases: | AddSupportedPlatforms |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefineVersionManually
Add this parameter to manually specify the OS version.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specify a configuration item object to add the supported platforms. To get this object, use the Get-CMConfigurationItem cmdlet.
Type: | PSObject |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Is64BitRequired
Set this parameter to $true to require 64-bit OS platforms.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveSupportedPlatform
Specify one or more supported platform objects to remove from the configuration item. To get this object, use the Get-CMSupportedPlatform cmdlet.
Type: | IResultObject[] |
Aliases: | RemoveSupportedPlatforms |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServicePackMajor
If you use the DefineVersionManually parameter, specify the service pack major version as an integer value.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServicePackMinor
If you use the DefineVersionManually parameter, specify the service pack minor version as an integer value.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VersionBuild
If you use the DefineVersionManually parameter, specify the build number as an integer value.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VersionMajor
If you use the DefineVersionManually parameter, specify the major version as an integer value.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VersionMinor
If you use the DefineVersionManually parameter, specify the minor version as an integer value.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet doesn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.Management.Automation.PSObject
Outputs
System.Object