{"id":2736,"date":"2013-10-13T11:59:00","date_gmt":"2013-10-13T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/10\/13\/powertip-use-poweshell-to-start-service-on-remote-machine\/"},"modified":"2013-10-13T11:59:00","modified_gmt":"2013-10-13T11:59:00","slug":"powertip-use-poweshell-to-start-service-on-remote-machine","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-use-poweshell-to-start-service-on-remote-machine\/","title":{"rendered":"PowerTip: Use PoweShell to Start Service on Remote Machine"},"content":{"rendered":"<p><strong>Summary<\/strong>: Learn how to use Windows PowerShell to start a service on a remote machine.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;How can I start a service on a remote machine?<\/p>\n<p style=\"padding-left: 30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;To start a service on a local machine:<\/p>\n<p style=\"padding-left: 90px\">Get-Service -Name bits&nbsp; | Start-service<\/p>\n<p style=\"padding-left: 60px\">But if you try to use the same technique on a remote machine, it tries to start the service on your local machine:<\/p>\n<p style=\"padding-left: 90px\">Get-Service -Name bits&nbsp; -ComputerName RSLAPTOP01 | Start-service<\/p>\n<p style=\"padding-left: 60px\">So you have to use <strong>Set-Service<\/strong>:<\/p>\n<p style=\"padding-left: 90px\">Get-Service -Name bits -ComputerName RSLAPTOP01 | Set-Service -Status Running<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to start a service on a remote machine. &nbsp;How can I start a service on a remote machine? &nbsp;To start a service on a local machine: Get-Service -Name bits&nbsp; | Start-service But if you try to use the same technique on a remote machine, it tries to start [&hellip;]<\/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,189,4,39,45],"class_list":["post-2736","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-richard-siddaway","tag-scripting-techniques","tag-services","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to start a service on a remote machine. &nbsp;How can I start a service on a remote machine? &nbsp;To start a service on a local machine: Get-Service -Name bits&nbsp; | Start-service But if you try to use the same technique on a remote machine, it tries to start [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2736","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=2736"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2736\/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=2736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}