{"id":1593,"date":"2007-03-14T16:56:43","date_gmt":"2007-03-14T16:56:43","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/2007\/03\/14\/introducing-windows-installer-powershell-extensions\/"},"modified":"2019-02-17T15:30:20","modified_gmt":"2019-02-17T22:30:20","slug":"introducing-windows-installer-powershell-extensions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/introducing-windows-installer-powershell-extensions\/","title":{"rendered":"Introducing Windows Installer PowerShell Extensions"},"content":{"rendered":"<p>Some time back I mentioned in a <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/2006\/06\/21\/642025.aspx\">comment<\/a> I was working on some PowerShell extensions for Windows Installer. Actually, it was a long time ago and I&#8217;ve spent more time learning the &#8220;ins&#8221; and &#8220;outs&#8221; of <a href=\"http:\/\/www.microsoft.com\/powershell\">PowerShell<\/a> (mostly the &#8220;ins&#8221; using <a href=\"http:\/\/www.aisto.com\/roeder\/dotnet\/\">.NET Reflector<\/a> because the documentation needs work) than actually writing anything. Then, of course, there was that little <a href=\"http:\/\/blogs.msdn.com\/heaths\/archive\/tags\/VS+2005+SP1\/default.aspx\">Visual Studio 2005 Service Pack 1 project<\/a>.<\/p>\n<p>While I am still busy working on things for future releases out of Developer Division and beyond, I want to make this project available and add features to it over time. So, I introduce to you the <a href=\"http:\/\/www.codeplex.com\/psmsi\">Windows Installer PowerShell Extensions<\/a> project on <a href=\"http:\/\/www.codeplex.com\/\">CodePlex<\/a>. There is no installation package yet as I explore better alternatives to running <em>installutil.exe<\/em> or implementing similar functionality for use in an in-process custom action, but you can <a href=\"http:\/\/www.codeplex.com\/psmsi\/Release\/ProjectReleases.aspx?ReleaseId=2271\">download what I have today<\/a> and install it yourself using <em>installutil.exe<\/em>. After installed, start PowerShell and execute the following:\n<\/p>\n<p><span style=\"font-family:Consolas\">add-pssnapin psmsi\n<\/span><\/p>\n<p>There are two cmdlets currently provided for enumerating installed and advertised product information, and for enumerating applied, superseded, and obsolesced patch information. I have posted <a href=\"http:\/\/www.codeplex.com\/psmsi\/Wiki\/View.aspx?title=Examples\">some examples<\/a> and will add more over time. For example, to get the sizes of all applied, superseded, and obsolesced patches, execute the following:\n<\/p>\n<p><span style=\"font-family:Consolas\">get-msipatchinfo -filter all | get-itemproperty | format-table fullname, lastwritetime, length -autosize\n<\/span><\/p>\n<p>I&#8217;d also like to shout out my appreciation to <a href=\"http:\/\/blogs.msdn.com\/saraford\">Sara Ford<\/a> for helping expedite the process of getting this project published on CodePlex.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time back I mentioned in a comment I was working on some PowerShell extensions for Windows Installer. Actually, it was a long time ago and I&#8217;ve spent more time learning the &#8220;ins&#8221; and &#8220;outs&#8221; of PowerShell (mostly the &#8220;ins&#8221; using .NET Reflector because the documentation needs work) than actually writing anything. Then, of course, [&hellip;]<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[20,27,30],"class_list":["post-1593","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-installation","tag-news","tag-powershell"],"acf":[],"blog_post_summary":"<p>Some time back I mentioned in a comment I was working on some PowerShell extensions for Windows Installer. Actually, it was a long time ago and I&#8217;ve spent more time learning the &#8220;ins&#8221; and &#8220;outs&#8221; of PowerShell (mostly the &#8220;ins&#8221; using .NET Reflector because the documentation needs work) than actually writing anything. Then, of course, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=1593"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/1593\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=1593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=1593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=1593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}