{"id":4141,"date":"2009-04-22T23:23:57","date_gmt":"2009-04-22T23:23:57","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/04\/22\/v2-quick-tip-starting-a-new-elevated-process-from-a-powershell-script\/"},"modified":"2019-02-18T13:12:41","modified_gmt":"2019-02-18T20:12:41","slug":"v2-quick-tip-starting-a-new-elevated-process-from-a-powershell-script","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/v2-quick-tip-starting-a-new-elevated-process-from-a-powershell-script\/","title":{"rendered":"V2 Quick Tip: Starting a new elevated process from a PowerShell script"},"content":{"rendered":"<p>One of the systems administration hurdles of the post-Vista world is figuring out how to make a script run as an administrator.<\/p>\n<p>In PowerShell V2, using the Start-Process cmdlet, this is a one liner that will get the job done:<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #0000ff\">Start-Process<\/span> <span style=\"color: #8b0000\">&quot;$psHome\\powershell.exe&quot;<\/span> <span style=\"color: #000080\">-Verb<\/span> <span style=\"color: #8a2be2\">Runas<\/span> <span style=\"color: #000080\">-ArgumentList<\/span> <span style=\"color: #8b0000\">'-command &quot;Get-Process&quot;'<\/span><\/pre>\n<p>Hope this Helps,<\/p>\n<p>James Brundage [MSFT]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the systems administration hurdles of the post-Vista world is figuring out how to make a script run as an administrator. In PowerShell V2, using the Start-Process cmdlet, this is a one liner that will get the job done: Start-Process &quot;$psHome\\powershell.exe&quot; -Verb Runas -ArgumentList &#8216;-command &quot;Get-Process&quot;&#8217; Hope this Helps, James Brundage [MSFT]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[137,334],"class_list":["post-4141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-ctp3","tag-v2quicktip"],"acf":[],"blog_post_summary":"<p>One of the systems administration hurdles of the post-Vista world is figuring out how to make a script run as an administrator. In PowerShell V2, using the Start-Process cmdlet, this is a one liner that will get the job done: Start-Process &quot;$psHome\\powershell.exe&quot; -Verb Runas -ArgumentList &#8216;-command &quot;Get-Process&quot;&#8217; Hope this Helps, James Brundage [MSFT]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=4141"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4141\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=4141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}