Get-CMConfigurationItemHistory
Get-CMConfigurationItemHistory
Gets the previous versions of a configuration item in Configuration Manager.
Syntax
Parameter Set: SearchByIdMandatory
Get-CMConfigurationItemHistory -Id <String[]> [-Revision <Int32> ] [ <CommonParameters>]
Parameter Set: SearchByNameMandatory
Get-CMConfigurationItemHistory -Name <String[]> [-Revision <Int32> ] [ <CommonParameters>]
Parameter Set: SearchByValueMandatory
Get-CMConfigurationItemHistory -InputObject <IResultObject> [-Revision <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-CMConfigurationItemHistory cmdlet gets the previous versions of a configuration item.
Microsoft System Center 2012 SP1 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.
Parameters
-Id<String[]>
Specifies an ID for a configuration item revision.
Aliases |
CIId |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies a configuration item object. To obtain a configuration item object, use the Get-CMConfigurationItem cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String[]>
Specifies an array of names of configuration items.
Aliases |
LocalizedDisplayName |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Revision<Int32>
Specifies the version of a configuration item as an integer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Get item history by name
This command gets the history for a configuration item named CMCI07.
PS C:\> Get-CMConfigurationItemHistory -Name "CMCI07"
Example 2: Get item history by ID
This command gets the previous version of a configuration item with the specified ID.
PS C:\> Get-CMConfigurationItemHistory -Id "16777568"