{"id":8401,"date":"2012-08-07T11:59:00","date_gmt":"2012-08-07T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/08\/07\/powertip-run-a-powershell-script-with-space-in-the-path\/"},"modified":"2012-08-07T11:59:00","modified_gmt":"2012-08-07T11:59:00","slug":"powertip-run-a-powershell-script-with-space-in-the-path","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-run-a-powershell-script-with-space-in-the-path\/","title":{"rendered":"PowerTip: Run a PowerShell Script with Space in the Path"},"content":{"rendered":"<p><b>Summary: <\/b>Learn how to run a script with a space in the path.\n<b>Question<\/b>: How do I run a script with a space in the path?<\/p>\n<p style=\"padding-left: 30px\"><b>Answer<\/b>&nbsp;<b>1<\/b>: PS &gt; c:my` foldermyscript.ps1<\/p>\n<p style=\"padding-left: 30px\"><b>Answer 2<\/b>: PS&gt; &amp;(&ldquo;c:my&nbsp;&nbsp;foldermyscript.ps1&rdquo;)\n<b>Question<\/b>: What is the easiest way to create an array?<\/p>\n<p style=\"padding-left: 30px\"><b>Answer&nbsp;1<\/b>: $array = &ldquo;1&rdquo;,&rdquo;2&rdquo;,&rdquo;3&rdquo;,&rdquo;4&rdquo;<\/p>\n<p style=\"padding-left: 30px\"><b>Answer 2<\/b>: $array = 1..4<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to run a script with a space in the path. Question: How do I run a script with a space in the path? Answer&nbsp;1: PS &gt; c:my` foldermyscript.ps1 Answer 2: PS&gt; &amp;(&ldquo;c:my&nbsp;&nbsp;foldermyscript.ps1&rdquo;) Question: What is the easiest way to create an array? Answer&nbsp;1: $array = &ldquo;1&rdquo;,&rdquo;2&rdquo;,&rdquo;3&rdquo;,&rdquo;4&rdquo; Answer 2: $array = 1..4<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[356,3,45],"class_list":["post-8401","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to run a script with a space in the path. Question: How do I run a script with a space in the path? Answer&nbsp;1: PS &gt; c:my` foldermyscript.ps1 Answer 2: PS&gt; &amp;(&ldquo;c:my&nbsp;&nbsp;foldermyscript.ps1&rdquo;) Question: What is the easiest way to create an array? Answer&nbsp;1: $array = &ldquo;1&rdquo;,&rdquo;2&rdquo;,&rdquo;3&rdquo;,&rdquo;4&rdquo; Answer 2: $array = 1..4<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/8401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=8401"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/8401\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=8401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=8401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=8401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}