# Registry locations for installed software $paths = # all users x64 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', # all users x86 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', # current user x64 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', # current user x86 'HKCU:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
# calculated properties
# AllUsers oder CurrentUser? $user = @{ Name = 'Scope' Expression = { if ($_.PSDrive -like'HKLM') { 'AllUsers' } else { 'CurrentUser' } } }
# list of registry locations where installed software is stored $paths = # all users x64 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', # all users x86 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', # current user x64 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', # current user x86 'HKCU:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
Get-ItemProperty-ErrorAction Ignore -Path$paths | # eliminate all entries with empty DisplayName Where-Object DisplayName | # select some properties (registry values) Select-Object-Property DisplayName, DisplayVersion, UninstallString, QuietUninstallString
VERBOSE: Found matching provider: Microsoft-Windows-WindowsUpdateClient
VERBOSE: The Microsoft-Windows-WindowsUpdateClient provider writes events to the System log.
VERBOSE: The Microsoft-Windows-WindowsUpdateClient provider writes events to the Microsoft-Windows-WindowsUpdateClient/Operational log.
VERBOSE: Constructed structured query:
VERBOSE: <QueryList><Query Id="0" Path="system"><Select Path="system">*[System/Provider[@Name='microsoft-windows-windowsupdateclient'] and
VERBOSE: (System/EventID=19)]</Select></Query></QueryList>.