Skip to content

Instantly share code, notes, and snippets.

@sheeeng
Created October 11, 2013 10:06
Show Gist options
  • Save sheeeng/6932419 to your computer and use it in GitHub Desktop.
Save sheeeng/6932419 to your computer and use it in GitHub Desktop.
########################################################################
# File : ListGUIDs.ps1
# Version : 1.0.0
# Purpose : List globally unique identifier (GUID) of programs installed.
# Synopsis:
# Usage : .\ListGUIDs.ps1
# Author: Leonard Lee <sheeeng@gmail.com>
########################################################################
# References:
# Filtering and Formatting Data
# http://technet.microsoft.com/en-us/magazine/cc162469.aspx
# http://technet.microsoft.com/en-us/magazine/2007.04.powershell.aspx
########################################################################
$uninstallRegistryKey = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
$programsInstalled = $uninstallRegistryKey | ForEach-Object {Get-ItemProperty $_.PsPath}
Foreach ($program in $programsInstalled)
{
#Write-Host $programsInstalled.Displayname $programsInstalled.ModifyPath
$programsInstalled | Select DisplayName, ModifyPath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment