Tuesday, May 12, 2020

Create Software Inventories

# read all child keys (*) from all four locations and do not emit # errors if one of these keys does not exist Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' -ErrorAction Ignore | # list only items with the DisplayName Where-Object DisplayName | # show these registry values per item Select-Object -Property DisplayName, DisplayVersion, UninstallString, InstallDate | # sort by DisplayName Sort-Object -Property DisplayName

taken from :

https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/create-software-inventories

No comments:

Node.JS rest api Tutorials