PowerShell Command to View Installation History

The following PowerShell command retrieves the installation history from the Reliability Monitor on a remote computer:

Get-WmiObject Win32_ReliabilityRecords -ComputerName PC123 -Property Message | Select-Object -First 100 Message | Format-List *

This command connects to the remote computer PC123, retrieves the reliability records, and displays the first 100 messages in a formatted list.

Example Result

Running the command will display an output similar to this:

Message : Windows Installer reconfigured the product. Product Name: ApplicationName. Product Version: VersionNumber. Product Language: LanguageCode. Manufacturer: ManufacturerName. Reconfiguration success or error status: StatusCode.

Steps to Run the Command

  1. Open PowerShell with administrative privileges.
  2. Copy and paste the command into the PowerShell console.
  3. Replace PC123 with the name of the target remote computer.
  4. Press Enter to execute the command and retrieve the installation history.

Example Script

Here is a complete PowerShell script to automate the process:

# Define the remote computer name
$remoteComputer = "PC123"

# Retrieve the installation history from the Reliability Monitor
$installationHistory = Get-WmiObject Win32_ReliabilityRecords -ComputerName $remoteComputer -Property Message | 
    Select-Object -First 100 Message | Format-List *

# Display the installation history
$installationHistory

Save the script as a .ps1 file and run it with administrative privileges to view the installation history on the specified remote computer.

Further Information

For more details on using the Reliability Monitor and PowerShell, refer to the official Microsoft documentation: Microsoft Documentation.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.