{"id":164731,"date":"2013-01-04T18:51:03","date_gmt":"2013-01-04T14:51:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=164731"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=164731","title":{"rendered":"<span class=\"post_title\">\u0420\u0435\u0448\u0430\u0435\u043c 9 \u0437\u0430\u0434\u0430\u0447 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Windows Server 2008 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/eef\/1be\/c68\/eef1bec6878c24a31ad68b76ed06356e.jpg\"\/><\/p>\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u043e\u0440\u043e\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c Windows Server 2008 \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0432\u044b\u0447\u044b\u0445 GUI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442 9 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell. (10 \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438\u0437 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u044b\u043b \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u043c \u2013 <i>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/i>).<br \/>  \u041f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u043f\u043e\u0441\u0442\u0430. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043c\u043d\u043e\u0433\u043e, \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0445\u043e\u0440\u043e\u0448\u0438\u0439, \u043d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c. <br \/>  \u0418\u0442\u0430\u043a, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b:  <\/p>\n<ol>\n<li>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell<\/li>\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <\/li>\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431\u044b<\/li>\n<li>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u0430 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0438\u0441\u043a\u0430<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 10 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/li>\n<li>\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u043f\u043a\u0435<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c server\u2019s uptime<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e Service Pack<\/li>\n<\/ol>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u044f\u0442\u044c \u0437\u0430\u0434\u0430\u0447 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435, \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 4 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c. \u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>1. \u041c\u0435\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 <\/h4>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0412\u044b \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u043f\u043e\u0434 Windows 7, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d. \u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 <b>CHI-WIN7-22 <\/b>\u0432 \u0427\u0438\u043a\u0430\u0433\u043e. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0435\u0433\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c; \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438.<br \/>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 ADSI \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 PowerShell \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"vbscript\">[ADSI]$Admin=\u201dWinNT:\/\/CHI-WIN7-22\/Administrator\u201d  <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 <b>CHI-WIN7-22 <\/b>\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u0435\u0435 ADSI \u043e\u0431\u044a\u0435\u043a\u0442\u0443 $Admin. \u0418\u043c\u044f WinNT \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443, \u043f\u0440\u0438\u043c\u0438\u0442\u0435 \u044d\u0442\u043e \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0412\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 CHI-WIN7-22 \u043d\u0430 \u0438\u043c\u044f \u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0412\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f.<br \/>  \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0434\u043e\u043b\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043f\u0440\u0438\u0448\u043b\u043e \u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0442. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u0437<b> $Admin <\/b>\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"vbscript\">$Admin.PasswordAge <\/code><\/pre>\n<p>  \u0412\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f, \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0435\u0435 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u043c\u0435\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0435\u0435 \u0432 \u0434\u043d\u0438 (\u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 86400 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0432 \u0441\u0443\u0442\u043a\u0430\u0445)):<\/p>\n<pre><code class=\"vbscript\">$Admin.PasswordAge.Value\/86400 <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>Value<\/b>. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e <b>PasswordAge <\/b>\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0435 \u0432 \u0447\u0438\u0441\u043b\u043e, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0434\u0435\u043b\u0435\u043d\u0438\u044f.<br \/>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c, \u0432\u044b\u0437\u0432\u0430\u0432 <b>SetPassword <\/b>\u043c\u0435\u0442\u043e\u0434 \u0438 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"vbscript\">$Admin.SetPassword(\u201cS3cre+WOrd\u201d) <\/code><\/pre>\n<p>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u041f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e Enter, \u043d\u0435 \u0436\u0434\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0438\u0441\u044c\u043c\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442! \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u0422\u043e, \u0447\u0442\u043e \u044f \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c, \u0430 \u043d\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u043c. \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432, <b>SetPassword <\/b>\u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <b>-whatif <\/b>\u0438\u043b\u0438 &#8212;<b>confirm<\/b>.<br \/>  \u042d\u0442\u043e \u0432\u0441\u0435. \u041f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043c\u043d\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e PowerShell-\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u0445. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/01-change-password.png\" alt=\"image\"\/><\/p>\n<h4>2. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u0414\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell. \u041a\u0430\u043a \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d\u044b \u043a\u0430\u043a \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u043e\u0434 Windows 7, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0448 \u0434\u043e\u043c\u0435\u043d.<br \/>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 WMI-\u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u0430 \u2013 <b>Restart-Computer <\/b>\u0438 <b>Stop-Computer<\/b>. \u0418 \u0445\u043e\u0442\u044f \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0445 \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (alternate credentials). \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0412\u0430\u043c \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0442 \u0442\u043e\u0439, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u043b\u0438\u0441\u044c), \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u0430 (\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f) \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u0430.<br \/>  \u0422\u0430\u043a\u0436\u0435 \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u043e\u0431 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u0430\u0445 \u2013 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b>-whatif <\/b>\u0438 &#8212;<b>confirm<\/b>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u044d\u0442\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432. <br \/>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"vbscript\">Restart-Computer -ComputerName &lt;string[ ]&gt; <\/code><\/pre>\n<p>  \u0433\u0434\u0435 <b>-ComputerName &lt;string[ ]&gt; <\/b>\u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u043a\u0430\u043a \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e, \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432. <b>Stop-Computer <\/b>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 CHI-DC02 \u0438 CHI-FP01, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"vbscript\">Restart-Computer \u201cCHI-DC02\u201d, \u201cCHI-FP01\u201d <\/code><\/pre>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 PowerShell, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <b>\u2013whatif<\/b>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/02-restart-computer.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b\u0435 <b>servers.txt<\/b>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>Get-Content<\/b>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/03-get-content.png\" alt=\"image\"\/><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c, \u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0445, \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>Get-Content<\/b>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b <b>Get-Content <\/b>\u0438 <b>Restart-Computer<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/04-restart-computers-from-a-text-file.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <b>Get-Content<\/b>. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u043f\u0438\u043d\u0433\u0443\u0435\u043c \u044d\u0442\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b. \u0412 \u044d\u0442\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438, \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c <b>test-connection<\/b>, \u0447\u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e <b>ping <\/b>\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. <b>-quiet <\/b>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f true \u0438\u043b\u0438 false, \u0430 <b>-count 2<\/b> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u201c\u043f\u0440\u043e\u043f\u0438\u043d\u0433\u043e\u0432\u0430\u043d\u201d \u043b\u0438\u0448\u044c \u0434\u0432\u0430\u0436\u0434\u044b. \u0422\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u043d\u0433\u043e\u0432\u0430\u043d\u044b, \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043b\u044c\u0448\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0443.<br \/>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b>foreach<\/b>. \u0426\u0435\u043b\u044c \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0432\u0430: \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0438\u043d\u0433-\u0442\u0435\u0441\u0442, \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0437\u0435\u043b\u0435\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. \u201c$_\u201d \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435. \u0417\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>Restart-Computer <\/b>\u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u0435\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0438\u043d\u0433\u0443\u044e\u0442\u0441\u044f. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>\u2013force<\/b>, \u0447\u0442\u043e\u0431\u044b \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435<br \/>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>\u2013whatif <\/b>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0431\u0435\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432.<\/p>\n<h4>3. \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043b\u0443\u0436\u0431\u044b<\/h4>\n<p>  <b>Restart-Service<\/b>, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043b\u0443\u0436\u0431\u0443. \u0425\u043e\u0442\u044f \u0443 \u043d\u0435\u0433\u043e \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d <b>PowerShell Remoting<\/b>, \u0442\u0430\u043a \u0447\u0442\u043e \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0435\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u042d\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432.<br \/>  \u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u043b\u0443\u0436\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 <i>Restart-Service \u201cservice<\/i>\u201d, \u0433\u0434\u0435 \u201cservice\u201d \u2013 \u0438\u043c\u044f \u0442\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>Invoke-Command<\/b> \u0438 <b>PowerShell Remoting<\/b>.<br \/>  \u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u044b <b>Restart-Service <\/b>\u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u043b\u0443\u0436\u0431\u044b <b>wuauserv <\/b>(Windows Update). \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <b>Restart-Service <\/b>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c, \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0411\u0414 CHI-DB01\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u0430 <b>Invoke-Command<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/05-restart-service.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <b>Restart-Service <\/b>\u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>-passthru<\/b>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f (Status, Name \u0438 \u0434\u0440\u0443\u0433\u043e\u0435) \u2013 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0441\u043b\u0443\u0436\u0431\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u0442\u0430\u043a\u0436\u0435, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u0435 \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u044b\u0435. <br \/>  \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 WMI. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c WMI \u043e\u0431\u044a\u0435\u043a\u0442: <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/06-get-wmiobject.png\" alt=\"image\"\/><\/p>\n<p>  <b>gwmi <\/b>\u2013 \u044d\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e \u0434\u043b\u044f <b>Get-WmiObject<\/b>.<br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412\u0432\u0435\u0434\u0435\u043c <b>Get-Member <\/b>(\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e <b>gm<\/b>).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/07-methods-of-wmi-object.png\" alt=\"image\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0437\u0434\u0435\u0441\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043b\u0443\u0436\u0431\u044b. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 <b>StopService <\/b>\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043d\u043e\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <b>StartService<\/b>.<br \/>  \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0435\u0442\u043e\u0434 <b>StopService <\/b>\u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041a\u0440\u0443\u0433\u043b\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 <b>ReturnValue <\/b>\u0440\u0430\u0432\u043d\u044b\u043c 0, \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u043b\u0443\u0436\u0431\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 MSDN \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u043b\u0443\u0436\u0431\u044b Win32.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/08-stopservice-method.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 \u2014 \u043c\u0435\u0442\u043e\u0434 <b>StartService<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/09-startservice-method.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c: \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <b>get-service <\/b>\u043d\u0430 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. <b>Get-service <\/b>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043b\u0443\u0436\u0431\u0435 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 CHI-DB01.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/10-get-service.png\" alt=\"image\"\/><\/p>\n<h4>4. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/h4>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>Stop-Process<\/b>. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 (\u0441\u043c. \u043f\u0443\u043d\u043a\u0442 3).<br \/>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u0430 <b>Stop-Process<\/b>.<br \/>  \u041f\u0435\u0440\u0432\u044b\u0439 \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 <b>Stop-Process <\/b>\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0435 \u0435\u043c\u0443 \u0438\u043c\u044f \u0438\u043b\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 ID \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u044b \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u201cCalc\u201d (\u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 Windows). \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/11-stop-process.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u0430 <b>Get-Process <\/b>\u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u0445 \u0432 <b>Stop-Process<\/b>. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0437\u044f\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 Notepad. <b>Kill <\/b>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f <b>Stop-Process<\/b>. Notepad \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/12-get-process-kill.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, notepad \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 chi-fp01.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/13-fire-up-a-process.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b>ps<\/b>, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f <b>Get-Process<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/14-get-process-alias.png\" alt=\"image\"\/><\/p>\n<h4>5. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0447\u0435\u0442 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0438\u0441\u043a\u043e\u0432<\/h4>\n<p>  \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 WMI \u0438 \u043a\u043b\u0430\u0441\u0441 Win32_LogicalDisk, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u044e\u0442 \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u043a ID \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0447\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<br \/>  \u0427\u0435\u0440\u0435\u0437 WMI \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u043c. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a \u043e\u0434\u043d\u043e\u0439, \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c: \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 .csv \u0438\u043b\u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0438\u043b\u0438 HTML-\u043e\u0442\u0447\u0435\u0442 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. <br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435.<\/p>\n<pre><code class=\"vbscript\">Get-WmiObject win32_logicaldisk -filter \u201cdrivetype=3\u201d | Out-File c:\\Reports\\Disks.txt <\/code><\/pre>\n<p>  \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>GetWmiObject <\/b>\u0434\u043b\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u0430 Win32_LogicalDisk. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c <b>-filter <\/b>\u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 drivetype=3, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0438\u0441\u043a\u0438, \u0442\u0438\u043f\u0430 C:. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e USB \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0434\u0438\u0441\u043a\u0430\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0444\u0430\u0439\u043b <b>Disks.txt<\/b>. <br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0432 PS.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/16-get-wmiobject-win32-logicaldisk.png\" alt=\"image\"\/><\/p>\n<p>  \u0425\u043e\u0442\u044f \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0432 \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u0430\u0445, \u0430 \u043d\u0435 \u0431\u0430\u0439\u0442\u0430\u0445. \u042d\u0442\u0438\u043c \u043c\u044b \u0438 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f.<br \/>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>Get-DiskUtil<\/b>. \u0425\u043e\u0442\u044f \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<br \/>  \u0410 \u0432\u043e\u0442 \u0438 \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/17-getdiskutil-function.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c.<br \/>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0435\u0440\u0435\u0442 \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438 \u0437\u0430\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u043a \u0438\u043c\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/18-function-parameter.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <b>Process<\/b>, \u0433\u0434\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u201c\u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u201d \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u201c$_\u201d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/19-process-script-block.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <b>GetWmiObject<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/20-get-wmiobject-inside-a-function.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>Select-Object<\/b> (\u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e <b>Select<\/b>). \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <b>Computername<\/b>. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 <b>SystemName<\/b> \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 ($_) \u0432 <b>Computername<\/b>. <b>DeviceID <\/b>\u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/21-hashtables.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446. \u041f\u0435\u0440\u0432\u0430\u044f \u0431\u0435\u0440\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>Size <\/b>\u0438 \u0434\u0435\u043b\u0438\u0442 \u0435\u0433\u043e \u043d\u0430 1GB, \u0432\u044b\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u0437\u043d\u0430\u043a\u0430\u043c\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432 <b>SizeGB<\/b>. \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <b>Freespace<\/b>. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/22-second-set-of-hashtables.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>UsedGB<\/b>, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442 \u0432 WMI. \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 <b>Size <\/b>\u0438 <b>FreeSpace <\/b>\u0438 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 1GB.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/23-creating-a-new-property.png\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>PerFree <\/b>\u2013 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445. \u041e\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/24-percent-free.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 CHI-FP01, \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 (<b>Format-Table <\/b>(\u0438\u043b\u0438 <b>ft<\/b>)) \u0441 \u0430\u0432\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>\u2013auto<\/b>). <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/25-get-diskutil-function-in-action.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0435 \u0438 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u043e\u0442 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0438\u0441\u043a\u043e\u0432 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u0432 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0447\u044c.<br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <b>$data<\/b>, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u043d\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u0417\u0430\u0442\u0435\u043c, \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <b>where<\/b>, \u043f\u0440\u043e\u043f\u0438\u043d\u0433\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0434\u0432\u0430\u0436\u0434\u044b) \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>Get-DiskUtil<\/b>. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/26-using-the-get-diskutil-function.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <b>$data<\/b>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 <b>$data <\/b>\u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e <b>computername<\/b>, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 <b>\u2013auto<\/b>. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u044c (<b>Out-Printer<\/b>) \u0438\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b (<b>Out-File<\/b>).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/27-using-the-output-of-the-get-diskutil-function.png\" alt=\"image\"\/><\/p>\n<p>  \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 csv:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/28-export-to-csv.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u0442\u043e\u043c \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 csv \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043d\u0438\u043c\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u043e\u0432 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/29-import-csv.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/30-snapshot-of-disk-utilization.png\" alt=\"image\"\/><\/p>\n<p>  \u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a: \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c HTML \u043e\u0442\u0447\u0435\u0442, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. <br \/>  \u0411\u0435\u0440\u0435\u043c <b>$data <\/b>\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u0435 \u0432 <b>Sort Computername<\/b>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 <b>ConvertTo-HTML<\/b>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u043f\u0443\u0442\u044c CSS. CSS \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c, \u0442\u0430\u043a \u043a\u0430\u043a <b>ConverToHTML <\/b>\u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0447\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f CSS \u0444\u0430\u0439\u043b. \u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0438\u0448\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u0430\u0439\u043b. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/31-output-to-html.png\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0444\u0430\u0439\u043b \u0433\u043e\u0442\u043e\u0432, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <b>start<\/b>.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/32-show-html-report.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 HTML \u043e\u0442\u0447\u0435\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.petri.co.il\/wp-content\/uploads\/33-disk-utilization-report.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439. <\/p>\n<p>  \u041a\u043e\u043d\u0435\u0446 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043c\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  P.S. \u041d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0430 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0435\u0439 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b NetWrix Disk Space Monitor. <br \/>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 <a href=\"http:\/\/www.youtube.com\/watch?v=eTs4mEgsKmc\">youtube<\/a>, c\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"http:\/\/www.netwrix.com\/ru\/disk_space_monitor_freeware.html\">\u0437\u0434\u0435\u0441\u044c <\/a>, \u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445 \u043b\u0438\u0431\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<p>  License name: NetWrix Disk Space Monitor Freeware License<br \/>  License count: 1000000<br \/>  License code: EhEQEhoaEhEQEhYTEhYaExQa        \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/netwrix\/blog\/164731\/\"> http:\/\/habrahabr.ru\/company\/netwrix\/blog\/164731\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/eef\/1be\/c68\/eef1bec6878c24a31ad68b76ed06356e.jpg\"\/><\/p>\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u043e\u0440\u043e\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c Windows Server 2008 \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u0432\u044b\u0447\u044b\u0445 GUI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442 9 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell. (10 \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0438\u0437 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u044b\u043b \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u043c \u2013 <i>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/i>).<br \/>  \u041f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u043f\u043e\u0441\u0442\u0430. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043c\u043d\u043e\u0433\u043e, \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0445\u043e\u0440\u043e\u0448\u0438\u0439, \u043d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c. <br \/>  \u0418\u0442\u0430\u043a, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b:  <\/p>\n<ol>\n<li>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell<\/li>\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <\/li>\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431\u044b<\/li>\n<li>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u0430 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0438\u0441\u043a\u0430<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c 10 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/li>\n<li>\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u043f\u043a\u0435<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c server\u2019s uptime<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e Service Pack<\/li>\n<\/ol>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0435 \u043f\u044f\u0442\u044c \u0437\u0430\u0434\u0430\u0447 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435, \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 4 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c. \u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-164731","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/164731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=164731"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/164731\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=164731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=164731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=164731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}