{"id":10952,"date":"2025-01-26T16:31:42","date_gmt":"2025-01-26T16:31:42","guid":{"rendered":"https:\/\/putridparrot.com\/blog\/?p=10952"},"modified":"2025-01-26T16:31:42","modified_gmt":"2025-01-26T16:31:42","slug":"running-powershell-in-a-windows-container","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/running-powershell-in-a-windows-container\/","title":{"rendered":"Running PowerShell in a Windows container"},"content":{"rendered":"<p>I was messing around with Windows based docker images, running IIS and an ASP.NET 4.7.x application and wanted to connect to it&#8217;s &#8220;shell&#8221; to explore what was installed etc.<\/p>\n<p>For Linux container you&#8217;ll probably use <em>bash<\/em>. From a Windows container we can just use <em>powershell<\/em> <\/p>\n<p><em>Just change &#8220;the-container-id&#8221; to the id of the container you wish to connect to<\/em><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndocker container exec -it the-container-id powershell\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I was messing around with Windows based docker images, running IIS and an ASP.NET 4.7.x application and wanted to connect to it&#8217;s &#8220;shell&#8221; to explore what was installed etc. For Linux container you&#8217;ll probably use bash. From a Windows container we can just use powershell Just change &#8220;the-container-id&#8221; to the id of the container you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[102],"tags":[],"class_list":["post-10952","post","type-post","status-publish","format-standard","hentry","category-docker"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=10952"}],"version-history":[{"count":2,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10952\/revisions"}],"predecessor-version":[{"id":11235,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10952\/revisions\/11235"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=10952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=10952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=10952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}