Get-CMConfigurationItemXMLDefinition

Gets an XML definition of a configuration item in Configuration Manager.

Syntax

Get-CMConfigurationItemXMLDefinition
   [-Id] <Int32>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMConfigurationItemXMLDefinition [-InputObject]  [-DisableWildcardHandling]
 [-ForceWildcardHandling] []
Get-CMConfigurationItemXMLDefinition [[-Name] ] [-DisableWildcardHandling] [-ForceWildcardHandling]
 []

Description

The Get-CMConfigurationItemXMLDefinition cmdlet gets an XML definition of a configuration item object as a string. You can specify a configuration item with the configuration item ID, the configuration item name, or using the Get-CMConfigurationItem cmdlet.

Examples

Example 1: Get XML formatted item using an ID

PS C:\> Get-CMConfigurationItemXMLDefinition -Id "16777568"

This command gets a configuration item formatted in XML for the item that has the specified identifier.

Example 2: Get XML formatted item using a name

PS C:\> Get-CMConfigurationItemXMLDefinition -Name "ConfigItem76"

This command gets a configuration item formatted in XML for the item named ConfigItem76.

Example 3: Get XML formatted item using a variable

PS C:\> $CIObj=Get-CMConfigurationItem -Id "16777568"
PS C:\> Get-CMConfigurationItemXMLDefinition -InputObject $CIObj

The first command uses the Get-CMConfigurationItem cmdlet to get a configuration item with the specified ID, and then stores it in the $CIObj variable.

The second command gets a configuration item formatted in XML for the item stored in $CIObj.

Required Parameters

-Id

Specifies an array of IDs of configuration items. You can use a comma-separated list.

Type:Int32
Aliases:CIId, CI_ID
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a configuration item object. To get a configuration item object, use the Get-CMConfigurationItem cmdlet.

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

Optional Parameters

-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Indicates that wildcard handling is enabled.

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

Specifies an array of names of configuration items. You can use a comma-separated list.

Type:String
Aliases:LocalizedDisplayName
Required:False
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False