Get-CMConfigurationItemHistory
Gets the previous versions of a configuration item in Configuration Manager.
Syntax
Get-CMConfigurationItemHistory
[-Name] <String>
[-Revision <Int32>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Get-CMConfigurationItemHistory
[-Id] <Int32>
[-Revision <Int32>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Get-CMConfigurationItemHistory
[-InputObject] <IResultObject>
[-Revision <Int32>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Description
The Get-CMConfigurationItemHistory cmdlet gets the previous versions of a configuration item.
Configuration Manager updates configuration items based on configuration management, software updates management, and operating system deployment. Configuration Manager stores the previous version of the item. The server removes previous versions, by default, when the data is more than 90 days old.
This cmdlet gets the history of an item for a specified item name. This cmdlet also gets the history for a specified revision of an item.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1: Get item history by name
PS XYZ:\> Get-CMConfigurationItemHistory -Name "CMCI07"
This command gets the history for a configuration item named CMCI07.
Example 2: Get item history by ID
PS XYZ:\> Get-CMConfigurationItemHistory -Id "16777568"
This command gets the previous version of a configuration item with the specified ID.
Parameters
-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 |
-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 |
-Id
Specifies an ID for a configuration item revision.
Type: | Int32 |
Aliases: | CIId, CI_ID |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specifies a configuration item object. To obtain a configuration item object, use the Get-CMConfigurationItem cmdlet.
Type: | IResultObject |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies an array of names of configuration items.
Type: | String |
Aliases: | LocalizedDisplayName |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Revision
Specifies the version of a configuration item as an integer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject
Outputs
IResultObject[]
IResultObject
Related Links
- Introduction to Compliance Settings in Configuration Manager
- Get-CMConfigurationItem
- Get-CMConfigurationItemXMLDefinition
- New-CMConfigurationItem
- Set-CMConfigurationItem
- Remove-CMConfigurationItem
- Import-CMConfigurationItem
- Export-CMConfigurationItem
- ConvertTo-CMConfigurationItem
- ConvertFrom-CMConfigurationItem