{"id":100,"date":"2020-09-28T14:56:56","date_gmt":"2020-09-28T12:56:56","guid":{"rendered":"https:\/\/sys-code-alpha.com\/?p=100"},"modified":"2020-09-28T14:56:56","modified_gmt":"2020-09-28T12:56:56","slug":"use-powershell-to-quickly-find-installed-software","status":"publish","type":"post","link":"https:\/\/sys-code-alpha.com\/?p=100","title":{"rendered":"Use PowerShell to Quickly Find Installed Software"},"content":{"rendered":"\n<p>The code below shows an easy way to gather software information from your machine.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function Get-Soft {\n        &lt;#  gcim win32_product\n       .SYNOPSIS\n       Lists software on local or remote machines.\n       .DESCRIPTION\n       Lists software on local or remote machines.\n       .Example\n       PS C:\\> Get-Soft | ft\n    \n       DisplayName                                                                         DisplayVersion         Publisher\n       -----------                                                                         --------------         ---------\n       FireStorm version V2.0.0.016                                                        V2.0.0.016\n       OpenAL\n       Adobe Common File Installer                                                         1.00.0000              Adobe System Incorporated\n       Adobe Bridge 1.0                                                                    001.000.000            Adobe Systems\n       Adobe Help Center 1.0                                                               001.000.000            Adobe Systems\n       Adobe Stock Photos 1.0                                                              001.000.000            Adobe Systems\n       #>\n    \n       &#91;CmdletBinding()]                    \n                param(\n                &#91;Switch]$NonMicrosoftOnly,   \n                &#91;String]$Publisher,  \n                &#91;String]$Name\n                )\n                \n                $soft1 = Get-ItemProperty HKLM:\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* -ErrorAction SilentlyContinue | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate, InstallLocation, UninstallString, InstallSource\n                $soft2 = Get-ItemProperty HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* -ErrorAction SilentlyContinue |  Select-Object DisplayName, DisplayVersion, Publisher, InstallDate, InstallLocation, UninstallString, InstallSource\n                $soft = $soft1 + $soft2 | ?{$_.DisplayName -notlike $null -and $_.UninstallString -notlike $null}\n                            \n                IF($NonMicrosoftOnly){ $out = $soft | Where-Object{ $_.Publisher -notmatch 'Microsoft'} }\n                IF($Publisher){ $out = $soft | Where-Object{ $_.Publisher -match $Publisher} }\n                IF($Name){ $out = $soft | Where-Object{ $_.DisplayName -match $Name} }            \n                IF($out){$out | Sort-object DisplayName}ELSE{$soft | Sort-object DisplayName }\n           }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The code below shows an easy way to gather software information from your machine.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=\/wp\/v2\/posts\/100"}],"collection":[{"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=100"}],"version-history":[{"count":1,"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=\/wp\/v2\/posts\/100\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=\/wp\/v2\/posts\/100\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sys-code-alpha.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}