{"id":701,"date":"2019-07-29T10:37:42","date_gmt":"2019-07-29T07:37:42","guid":{"rendered":"https:\/\/blog.airmeno.ru\/?p=701"},"modified":"2019-09-12T17:18:32","modified_gmt":"2019-09-12T14:18:32","slug":"udalennoe-upravlenie-s-pomoshhyu-powershell","status":"publish","type":"post","link":"https:\/\/blog.airmeno.ru\/?p=701","title":{"rendered":"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell"},"content":{"rendered":"\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 PowerShell. <\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 PowerShell (PowerShell Remoting) \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>PowerShell Remoting \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 Web Services for Management (WS-Management) \u0438 \u0441\u043b\u0443\u0436\u0431\u044b  Windows Remote Management (WinRM). \u0421\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c\u0438 \u0438\u0434\u0435\u0442 \u043f\u043e HTTP (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0440\u0442 5985) \u0438\u043b\u0438 HTTPS (\u0435\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u043f\u043e\u0440\u0442 443 \u0438\u043b\u0438 5985).<\/p>\n\n\n\n<p><strong>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0443\u043f\u043f\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u0441\u0441\u0438\u0438 PowerShell:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Policies > Administrative Templates > Windows Components > Windows Remote Management (WinRM) > WinRM Service > Allow Remote Server management through WinRM\n\n\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 - Enabled;\n\u0424\u0438\u043b\u044c\u0442\u0440\u044b IPv4 \u0438 IPv6 \u043d\u0430 * , \u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b.<\/code><\/pre>\n\n\n\n<p>\u0414\u043e Server 2008 R2 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c &#8212; Open the Allow automatic configuration of listeners policy setting.<\/p>\n\n\n\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b \u0431\u0440\u0430\u043d\u0434\u043c\u0430\u0443\u044d\u0440\u0430<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Policies > Administrative Templates > Network > Network Connections > Windows Firewall > Domain Profile > Windows Defender Firewall:Define inbound port exceptions\n\n\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 - Enabled;\n\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 - Show > \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 - 5985:TCP:*:enabled:WSMan<\/code><\/pre>\n\n\n\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043e\u0432\u043e\u0439 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter-PSSession -ComputerName \u0421omp-09\nRestart-Service -Name ServiceName\n\u0418\u043b\u0438\nEnter-PSSession \u0421omp-09\nStop-Computer<\/code><\/pre>\n\n\n\n<p>\u041c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u043e WinRM  &#8212; <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winrm\/portal\">https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winrm\/portal<\/a><br>\u041f\u0440\u043e Enter-PSSession &#8212; <a href=\"https:\/\/docs.microsoft.com\/en-us\/PowerShell\/module\/microsoft.PowerShell.core\/enter-pssession?view=powershell-6\">https:\/\/docs.microsoft.com\/en-us\/PowerShell\/module\/microsoft.PowerShell.core\/enter-pssession?view=powershell-6<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0431\u0435\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 PowerShell. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 PowerShell (PowerShell Remoting) \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u043b\u0438&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,65],"tags":[22,24,76,77],"_links":{"self":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts\/701"}],"collection":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=701"}],"version-history":[{"count":4,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":780,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=\/wp\/v2\/posts\/701\/revisions\/780"}],"wp:attachment":[{"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.airmeno.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}