ConvertTo-CMConfigurationItem
Convert a Configuration Manager management iResultObject to a configuration item object.
Syntax
ByObjectValue (Default)
ConvertTo-CMConfigurationItem
-InputObject <IResultObject>
[-Force]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
ByStringValue
ConvertTo-CMConfigurationItem
-DigestText <String>
[-Force]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Description
The ConvertTo-CMConfigurationItem cmdlet converts a string which contains Configuration Item digest XML definition into a ConfigurationItem object.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.
Examples
Example 1
PS XYZ:\> $myCI = ConvertTo-CMConfigurationItem -DigestText $digestString
PS XYZ:\> $myCI.Persist($myCI)
This command converts a digest into a ConfigurationItem object, and then save the object to the site.
Parameters
-DigestText
Specifies the Digest text.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByStringValue
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-InputObject
Specifies a configuration item object. To obtain a configuration item object, you can use the Get-CMConfigurationItem cmdlet.
Parameter properties
| Type: | IResultObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByObjectValue
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
Outputs
System.Object
Related Links
- Introduction to Compliance Settings in Configuration Manager
- Get-CMConfigurationItem
- Get-CMConfigurationItemXMLDefinition
- Get-CMConfigurationItemHistory
- New-CMConfigurationItem
- Set-CMConfigurationItem
- Remove-CMConfigurationItem
- Import-CMConfigurationItem
- Export-CMConfigurationItem
- ConvertFrom-CMConfigurationItem