{"id":9913,"date":"2024-10-13T22:44:11","date_gmt":"2024-10-13T20:44:11","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=9913"},"modified":"2024-10-14T09:53:43","modified_gmt":"2024-10-14T07:53:43","slug":"windows-check-if-powershell-process-is-the-32-or-64-bit-version","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-check-if-powershell-process-is-the-32-or-64-bit-version\/","title":{"rendered":"Windows: Check if Powershell process is the 32 or 64 Bit Version"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_9913 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_9913')){$('.twoclick_social_bookmarks_post_9913').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Check%20if%20Powershell%20process%20is%20the%2032%20or%2064%20Bit%20Version\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Asometimes%20it%20is%20importend%2C%20when%20writing%20to%20the%20registry%20or%20file%20system%20in%20regions%20where%20the%20architecture%20redirection%20active%2C%20to%20known%20on%20which%20version%20a%20script%20runs.%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-check-if-powershell-process-is-the-32-or-64-bit-version\\\/\",\"post_id\":9913,\"post_title_referrer_track\":\"Windows%3A+Check+if+Powershell+process+is+the+32+or+64+Bit+Version\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>sometimes it is importend, when writing to the registry or file system in regions where the architecture redirection active, to known on which version a script runs.<\/p>\n<p><!--more--><\/p>\n<p>This can be simply that by the size of an integer pointer. The size on 32Bit Systems is 4 Bytes and on 64Bit systems 8 Byte.<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; if(&#x5B;System.IntPtr]::Size -eq 4)\r\n{\r\n    write-host &quot;32 Bit&quot;\r\n}\r\nelse\r\n{\r\n    write-host &quot;64 Bit&quot;\r\n}\r\n\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, sometimes it is importend, when writing to the registry or file system in regions where the architecture redirection active, to known on which version a script runs.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[344,4],"tags":[2058,2059,2057,133,20,855,856],"class_list":["post-9913","post","type-post","status-publish","format-standard","hentry","category-powershell-scripting","category-windowsscripts","tag-32-bit","tag-64-bit","tag-architecture","tag-powershell","tag-windows-2","tag-x64","tag-x86"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=9913"}],"version-history":[{"count":1,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9913\/revisions"}],"predecessor-version":[{"id":9914,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/9913\/revisions\/9914"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=9913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=9913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=9913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}