ConvertTo-CMConfigurationItem
Convert a Configuration Manager management iResultObject to a configuration item object.
Syntax
ConvertTo-CMConfigurationItem
[-Force]
-InputObject <IResultObject>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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 |
-Force
Forces the command to run without asking for user confirmation.
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
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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
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