ConvertTo-CMConfigurationItem

SYNOPSIS

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

SYNTAX

ByObjectValue (Default)

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

ByStringValue

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
Parameter Sets: ByStringValue
Aliases:

Required: True
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
Parameter Sets: (All)
Aliases:

Required: False
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
Parameter Sets: (All)
Aliases:

Required: False
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
Parameter Sets: (All)
Aliases:

Required: False
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
Parameter Sets: ByObjectValue
Aliases:

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

INPUTS

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

OUTPUTS

System.Object

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