Powershell - Lister les applications installées
Rédigé par Xpress
Aucun commentaire
Classé dans : Powershell
$res=@() $paths='HKLM:SOFTWAREMicrosoftWindowsCurrentVersionUninstall','HKLM:SOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionUninstall' ForEach($path in $paths) { $keys=Get-ChildItem -path $path ForEach($key in $keys) { $newpath=$path+''+$key.PSChildName $name=(Get-ItemProperty -Path $newpath -Name 'DisplayName' -ErrorAction SilentlyContinue ).DisplayName $version=(Get-ItemProperty -Path $newpath -Name 'DisplayVersion' -ErrorAction SilentlyContinue ).DisplayVersion If($name.Length -gt 0) { $res+=[PSCustomObject] @{logiciel=$name;version=$version} } } } $res|sort -unique -property logiciel|out-GridView