ConvertTo-CMConfigurationItem

Convert a Configuration Manager management iResultObject to a configuration item object.

Syntax

ConvertTo-CMConfigurationItem
         -InputObject <IResultObject>
         [-Force]
         [-DisableWildcardHandling]
         [-ForceWildcardHandling]
ConvertTo-CMConfigurationItem
         -DigestText <String>
         [-Force]
         [-DisableWildcardHandling]
         [-ForceWildcardHandling]

Description

The ConvertTo-CMConfigurationItem cmdlet converts a string which contains Configuration Item digest XML definition into a ConfigurationItem object.

Examples

Example 1

PS C:\> $myCI = ConvertTo-CMConfigurationItem -DigestText $digestString 
PS C:\> $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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a configuration item object. To obtain a configuration item object, you can use the Get-CMConfigurationItem cmdlet.

Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object