bloginfo

Installed Applications List

May 21st, 2019 (edited)
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Installed applications List
  2. $res=@()
  3. $paths='HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall','HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
  4. ForEach($path in $paths)
  5. {
  6.     $keys=Get-ChildItem -path $path
  7.     ForEach($key in $keys)
  8.     {
  9.         $newpath=$path+'\'+$key.PSChildName
  10.         $name=(Get-ItemProperty -Path $newpath -Name 'DisplayName' -ErrorAction SilentlyContinue ).DisplayName
  11.         $version=(Get-ItemProperty -Path $newpath -Name 'DisplayVersion' -ErrorAction SilentlyContinue ).DisplayVersion
  12.         If($name.Length -gt 0)
  13.         {
  14.             $res+=[PSCustomObject] @{logiciel=$name;version=$version}
  15.         }
  16.     }
  17. }
  18. $res|sort -unique -property logiciel|out-GridView
Add Comment
Please, Sign In to add comment