{"id":1559,"date":"2009-07-07T08:00:18","date_gmt":"2009-07-07T16:00:18","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/"},"modified":"2009-07-07T08:00:18","modified_gmt":"2009-07-07T16:00:18","slug":"july-powershell-one-liner","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/","title":{"rendered":"July PowerShell One-Liner"},"content":{"rendered":"<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2009\/06\/Search01.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; margin: 0px 5px 5px 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" border=\"0\" alt=\"Search01\" align=\"left\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2009\/06\/Search01_thumb.png\" width=\"58\" height=\"120\"><\/a> This month&#8217;s PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You&#8217;ll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer.<\/p>\n<p>This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I&#8217;ve broken the expression into several lines for publication purposes but this is in fact a oneline expression. <\/p>\n<p>This has been tested on both PowerShell v1 and v2.<\/p>\n<div style=\"border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px\">\n<div style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">Get-WmiObject win32_product -computer $env:computername | <\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">sort Vendor,InstallDate | <\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">Format-Table -GroupBy Vendor Name,`<\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">@{Label=<span style=\"color: #006080\">\"InstallDate\"<\/span>;Expression={<\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #006080\">\"$($_.InstallDate.substring(4,2))\/$($_.InstallDate.substring(6,2))\/$($_.InstallDate.substring(0,4))\"<\/span>}},`<\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">InstallLocation,InstallSource,PackageName,Version -wrap | <\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">Out-File productreport.txt<\/pre>\n<\/div>\n<\/div>\n<p>I probably could have left the InstallDate alone since a value like 20090511 isn&#8217;t too hard to figure out, but I took the extra step to parse and reorder so that you get a friendlier value of 05\/11\/2009. Of course if you have different regional settings you might need to tweak my substring parsing.<\/p>\n<p>The oneliner builds a formatted report, but you could easily modify it to use <strong>Select-Object<\/strong> instead so that you could export to a CSV, build an HTML report or whatever you require.<\/p>\n<p>There is a wealth of information in this class. Here are some other ways you might want leverage this class:<\/p>\n<div style=\"border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px\">\n<div style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">$products=Get-WmiObject win32_product -computer $env:computername<\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">$products | sort InstallDate | Select Name,InstallDate,Vendor,Version<\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">$products | group vendor | sort count -descending | Select Count,Name<\/pre>\n<pre style=\"border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\">$products | Where {$_.vendor <span style=\"color: #cc6633\">-like<\/span> <span style=\"color: #006080\">\"SAPIEN*\"<\/span>} | Sort Name | Select Name,Version,InstallDate,InstallSource,PackageName<\/pre>\n<\/div>\n<\/div>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px\" id=\"scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:04a48f82-16f0-4c23-ae26-ec9ed453840f\" class=\"wlWriterSmartContent\">\n<p>Download a script file with these expressions <a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2009\/06\/July09-OneLiner.txt\" target=\"_blank\">here.<\/a><\/p>\n<\/div>\n<\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This month&#8217;s PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You&#8217;ll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer.<\/p>\n<p>This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I&#8217;ve broken the expression into several lines for publication purposes but this is in fact a oneline expression.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[25],"tags":[28,57,516,35],"class_list":["post-1559","post","type-post","status-publish","format-standard","hentry","category-windows-powershell","tag-powershell","tag-scripting","tag-win32_product","tag-wmi"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"This month&#039;s PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You&#039;ll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I&#039;ve broken the expression into several lines for publication purposes but this is in fact a oneline expression.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jeffery Hicks\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"DEV SAPIEN Blog - Tools for IT Success\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"July PowerShell One-Liner - DEV SAPIEN Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"This month&#039;s PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You&#039;ll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I&#039;ve broken the expression into several lines for publication purposes but this is in fact a oneline expression.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-07-07T16:00:18+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-07-07T16:00:18+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"July PowerShell One-Liner - DEV SAPIEN Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This month&#039;s PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You&#039;ll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I&#039;ve broken the expression into several lines for publication purposes but this is in fact a oneline expression.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#blogposting\",\"name\":\"July PowerShell One-Liner - DEV SAPIEN Blog\",\"headline\":\"July PowerShell One-Liner\",\"author\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/www.sapien.com\\\/blog\\\/wp-content\\\/uploads\\\/2009\\\/06\\\/Search01_thumb.png\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#articleImage\"},\"datePublished\":\"2009-07-07T08:00:18-07:00\",\"dateModified\":\"2009-07-07T08:00:18-07:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#webpage\"},\"articleSection\":\"Windows PowerShell, powershell, scripting, WIn32_Product, wmi\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dev.sapien.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/#listItem\",\"name\":\"Windows PowerShell\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/#listItem\",\"position\":2,\"name\":\"Windows PowerShell\",\"item\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#listItem\",\"name\":\"July PowerShell One-Liner\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#listItem\",\"position\":3,\"name\":\"July PowerShell One-Liner\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/topics\\\/windows-powershell\\\/#listItem\",\"name\":\"Windows PowerShell\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\",\"name\":\"DEV SAPIEN Blog\",\"description\":\"Tools for IT Success\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/\",\"name\":\"Jeffery Hicks\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#webpage\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/\",\"name\":\"July PowerShell One-Liner - DEV SAPIEN Blog\",\"description\":\"This month's PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You'll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I've broken the expression into several lines for publication purposes but this is in fact a oneline expression.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/2009\\\/07\\\/07\\\/july-powershell-one-liner\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/author\\\/jeffery-hicks\\\/#author\"},\"datePublished\":\"2009-07-07T08:00:18-07:00\",\"dateModified\":\"2009-07-07T08:00:18-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/\",\"name\":\"DEV SAPIEN Blog\",\"description\":\"Tools for IT Success\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/dev.sapien.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"July PowerShell One-Liner - DEV SAPIEN Blog","description":"This month's PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You'll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I've broken the expression into several lines for publication purposes but this is in fact a oneline expression.","canonical_url":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#blogposting","name":"July PowerShell One-Liner - DEV SAPIEN Blog","headline":"July PowerShell One-Liner","author":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author"},"publisher":{"@id":"https:\/\/dev.sapien.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2009\/06\/Search01_thumb.png","@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#articleImage"},"datePublished":"2009-07-07T08:00:18-07:00","dateModified":"2009-07-07T08:00:18-07:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#webpage"},"isPartOf":{"@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#webpage"},"articleSection":"Windows PowerShell, powershell, scripting, WIn32_Product, wmi"},{"@type":"BreadcrumbList","@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/dev.sapien.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/#listItem","name":"Windows PowerShell"}},{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/#listItem","position":2,"name":"Windows PowerShell","item":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/","nextItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#listItem","name":"July PowerShell One-Liner"},"previousItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#listItem","position":3,"name":"July PowerShell One-Liner","previousItem":{"@type":"ListItem","@id":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/#listItem","name":"Windows PowerShell"}}]},{"@type":"Organization","@id":"https:\/\/dev.sapien.com\/blog\/#organization","name":"DEV SAPIEN Blog","description":"Tools for IT Success","url":"https:\/\/dev.sapien.com\/blog\/"},{"@type":"Person","@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author","url":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/","name":"Jeffery Hicks"},{"@type":"WebPage","@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#webpage","url":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/","name":"July PowerShell One-Liner - DEV SAPIEN Blog","description":"This month's PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You'll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I've broken the expression into several lines for publication purposes but this is in fact a oneline expression.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/dev.sapien.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/#breadcrumblist"},"author":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author"},"creator":{"@id":"https:\/\/dev.sapien.com\/blog\/author\/jeffery-hicks\/#author"},"datePublished":"2009-07-07T08:00:18-07:00","dateModified":"2009-07-07T08:00:18-07:00"},{"@type":"WebSite","@id":"https:\/\/dev.sapien.com\/blog\/#website","url":"https:\/\/dev.sapien.com\/blog\/","name":"DEV SAPIEN Blog","description":"Tools for IT Success","inLanguage":"en-US","publisher":{"@id":"https:\/\/dev.sapien.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"DEV SAPIEN Blog - Tools for IT Success","og:type":"article","og:title":"July PowerShell One-Liner - DEV SAPIEN Blog","og:description":"This month's PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You'll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I've broken the expression into several lines for publication purposes but this is in fact a oneline expression.","og:url":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/","article:published_time":"2009-07-07T16:00:18+00:00","article:modified_time":"2009-07-07T16:00:18+00:00","twitter:card":"summary_large_image","twitter:title":"July PowerShell One-Liner - DEV SAPIEN Blog","twitter:description":"This month's PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You'll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I've broken the expression into several lines for publication purposes but this is in fact a oneline expression."},"aioseo_meta_data":{"post_id":"1559","title":null,"description":null,"keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-08-28 14:39:10","updated":"2026-08-28 14:39:10"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/dev.sapien.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/\" title=\"Windows PowerShell\">Windows PowerShell<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tJuly PowerShell One-Liner\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/dev.sapien.com\/blog"},{"label":"Windows PowerShell","link":"https:\/\/dev.sapien.com\/blog\/topics\/windows-powershell\/"},{"label":"July PowerShell One-Liner","link":"https:\/\/dev.sapien.com\/blog\/2009\/07\/07\/july-powershell-one-liner\/"}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/1559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=1559"}],"version-history":[{"count":0,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/1559\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=1559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=1559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=1559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}