{"id":179,"date":"2009-12-06T16:12:35","date_gmt":"2009-12-06T05:12:35","guid":{"rendered":"http:\/\/threemillion.net\/blog\/?p=179"},"modified":"2010-07-13T18:13:25","modified_gmt":"2010-07-13T08:13:25","slug":"create-a-temp-file-in-powershell","status":"publish","type":"post","link":"https:\/\/threemillion.net\/blog\/?p=179","title":{"rendered":"Create a temp file in Powershell"},"content":{"rendered":"<p>Create a temporary file in the TMP environment variable location in powershell:<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">$TempFile = [System.Io.Path]::GetTempFileName()<\/pre>\n<p>So as an example the above will create something like this:<br \/>\nC:\\Users\\<user>\\AppData\\Local\\Temp\\tmp3472.tmp<\/p>\n<p>This $TempFile variable can then be used in a script.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a temporary file in the TMP environment variable location in powershell: So as an example the above will create something like this: C:\\Users\\\\AppData\\Local\\Temp\\tmp3472.tmp This $TempFile variable can then be <a href=\"https:\/\/threemillion.net\/blog\/?p=179\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[8,5],"tags":[],"class_list":["entry","author-admin","post-179","post","type-post","status-publish","format-standard","category-powershell","category-scripting"],"_links":{"self":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179"}],"version-history":[{"count":2,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":307,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions\/307"}],"wp:attachment":[{"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/threemillion.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}