{"id":4101,"date":"2009-04-30T17:02:00","date_gmt":"2009-04-30T17:02:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/04\/30\/enable-psremoting\/"},"modified":"2019-02-18T13:12:40","modified_gmt":"2019-02-18T20:12:40","slug":"enable-psremoting","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/enable-psremoting\/","title":{"rendered":"Enable-PSRemoting"},"content":{"rendered":"<p><span>I installed Win7 RC build yesterday and&nbsp;tried to enable PS Remoting. I launched PowerShell elevated, ran Enable-PsRemoting cmdlet but it gave an \u201caccess denied\u201d error message&nbsp;<\/span><\/p>\n<table class=\"MsoTableGrid\" border=\"1\" cellSpacing=\"0\" cellPadding=\"0\">\n<tbody>\n<tr>\n<td vAlign=\"top\" width=\"798\">\n<p><span>PS C:\\Windows\\system32&gt; Enable-PSRemoting -force<\/span><span><br \/><span>WinRM already is set up to receive requests on this machine.<br \/>Set-WSManQuickConfig : Access is denied.<br \/>At line:50 char:33<br \/>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set-WSManQuickConfig &lt;&lt;&lt;&lt;&nbsp; -force<br \/>&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException<br \/>&nbsp;&nbsp;&nbsp; + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand<\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span>One good thing in PowerShell help in RC is \u201cabout_Remote_Troubleshooting\u201d. It is very detailed and covers all important failure scenarios. Go through it if you face problem with enabling remoting on a box<\/span><\/p>\n<p class=\"MsoNormal\"><span>To summarize, there are few things that I had to check<\/span><\/p>\n<p class=\"MsoListParagraphCxSpFirst\"><span><span>1.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/span><span>My machine is connected to domain.<\/span><\/p>\n<p class=\"MsoListParagraphCxSpMiddle\"><span><span>2.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/span><span>I am logged in as administrator <\/span><\/p>\n<p class=\"MsoListParagraphCxSpMiddle\"><span><span>3.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/span><span>PowerShell is launched elevated.<\/span><\/p>\n<p class=\"MsoListParagraphCxSpLast\"><span><span>4.<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/span><span>My password is not blank<\/span><\/p>\n<p class=\"MsoNormal\"><span>Problem was that my domain a\/c was not an administrator on the box. Even if I launch PowerShell elevated (and give local administrator creds) it was not working. I tried logging in as local admin but Enable-PS Remoting still failed. <\/span><\/p>\n<p class=\"MsoNormal\"><span><strong>Solution<\/strong>: I had to add my domain a\/c to administrators group and Enable-PsSession worked after that.<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;<\/span>If you are not an administrator, Enable-PsSession will fail even if you launch elevated. This is true for some other remoting configuration cmdlets as well e.g.<\/span><\/p>\n<p class=\"MsoNormal\"><span><span>&nbsp;<\/span>Set-PSSessionConfiguration Microsoft.Powershell -ShowSecurityDescriptorUI<\/span><\/p>\n<p class=\"MsoNormal\"><span>Another important thing to know is \u2013 \u201cYou must run PowerShell elevated if you\u2019re connecting to the same box (localhost)\u201d. <\/span><\/p>\n<p class=\"MsoNormal\"><span>Osama Sajid<\/span><\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I installed Win7 RC build yesterday and&nbsp;tried to enable PS Remoting. I launched PowerShell elevated, ran Enable-PsRemoting cmdlet but it gave an \u201caccess denied\u201d error message&nbsp; PS C:\\Windows\\system32&gt; Enable-PSRemoting -forceWinRM already is set up to receive requests on this machine.Set-WSManQuickConfig : Access is denied.At line:50 char:33+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set-WSManQuickConfig &lt;&lt;&lt;&lt;&nbsp; -force&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : InvalidOperation: (:) [Set-WSManQuickConfig], [&hellip;]<\/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":[288],"class_list":["post-4101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-remoting-enable-psremoting"],"acf":[],"blog_post_summary":"<p>I installed Win7 RC build yesterday and&nbsp;tried to enable PS Remoting. I launched PowerShell elevated, ran Enable-PsRemoting cmdlet but it gave an \u201caccess denied\u201d error message&nbsp; PS C:\\Windows\\system32&gt; Enable-PSRemoting -forceWinRM already is set up to receive requests on this machine.Set-WSManQuickConfig : Access is denied.At line:50 char:33+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set-WSManQuickConfig &lt;&lt;&lt;&lt;&nbsp; -force&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : InvalidOperation: (:) [Set-WSManQuickConfig], [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4101","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=4101"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4101\/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=4101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}