{"id":300601,"date":"2020-03-23T15:00:46","date_gmt":"2020-03-23T15:00:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300601"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300601","title":{"rendered":"\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Windows PowerShell \u0438 \u0441 \u0447\u0435\u043c \u0435\u0433\u043e \u0435\u0434\u044f\u0442? \u0427\u0430\u0441\u0442\u044c 3: \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/493366\/\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/493366\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-b\/i_\/73\/-bi_73lwdxmnzvtveeghrwvtqay.png\"><\/a><\/p>\n<p>  \u0412\u043e <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/490924\/\"><b>\u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430<\/b><\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f PowerShell, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043d\u0435\u043c \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432.<a name=\"habracut\"><\/a><\/p>\n<h2><font color=\"#3AC1EF\">\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/font><\/h2>\n<p>  <a href=\"#section1\">\u041f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/a><br \/>  <a href=\"#section2\">\u0411\u043b\u043e\u043a Param()<\/a><br \/>  <a href=\"#section3\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/a><br \/>  <a href=\"#section4\">\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440<\/a><br \/>  <a href=\"#section5\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><br \/>  <a href=\"#section6\">\u0410\u0442\u0440\u0438\u0431\u0443\u0442 [CmdletBinding()] \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a> <br \/>  <a href=\"#section7\">\u041c\u043e\u0434\u0443\u043b\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432<\/a><\/p>\n<p>  <a name=\"section1\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u041f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/font><\/h3>\n<p>  \u0412 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/490924\/#section13\">\u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b), \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $args. \u042d\u0442\u043e\u0442 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/490924\/#section11\">\u043c\u0430\u0441\u0441\u0438\u0432<\/a> \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439:<\/p>\n<pre><code class=\"powershell\">Write-Host &quot;\u041f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:&quot; $args.count Write-Host &quot;\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b:&quot; $args<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pv\/ba\/n8\/pvban8oufym9ppbwb0jkgp_rwfq.png\" alt=\"image\"><\/p>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e:<\/p>\n<pre><code class=\"powershell\">function Print-Args {     Write-Host &quot;\u041f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:&quot; $args.count     Write-Host &quot;\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 0:&quot; $args[0]     Write-Host &quot;\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 1:&quot; $args[1]  }<\/code><\/pre>\n<p>  Print-Args \u00ab\u041d\u043e\u043b\u044c\u00bb \u00ab\u041e\u0434\u0438\u043d\u00bb<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 Print-Args \u043c\u044b \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u044f\u0442\u0443\u044e \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u043c\u0430\u0441\u0441\u0438\u0432, \u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 $args \u2014 \u0435\u0433\u043e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0442\u0435\u043b\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tf\/ur\/o7\/tfuro78h2bg7vhs405ymxd7ks-o.png\" alt=\"image\"><\/p>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0445 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  <a name=\"section2\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u0411\u043b\u043e\u043a Param()<\/font><\/h3>\n<p>  \u0412 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0412 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/490924\/#section13\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"powershell\">function test ($arg0, ..., $argN) {         }<\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043f\u0440\u0438\u0432\u044b\u0447\u0435\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c) \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u2014 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0438\u0441\u0441\u043e\u043d\u0430\u043d\u0441. \u0422\u0430\u043a\u043e\u0432\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430 shell-\u044f\u0437\u044b\u043a\u043e\u0432: \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u0412\u044b\u0437\u043e\u0432 <strong>test($value0)<\/strong> \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d, \u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445, \u0442.\u0435. <strong>($value0)<\/strong> \u0432\u043c\u0435\u0441\u0442\u043e <strong>$value0<\/strong>. \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443\u0436\u0435 \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 <strong>test($value0, $value1)<\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u2014 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <strong>$value0<\/strong> \u0438 <strong>$value1<\/strong>.<\/p>\n<p>  \u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u044f Microsoft \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a Param() \u2014 \u044d\u0442\u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u0435\u043d \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u043e \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432:<\/p>\n<pre><code class=\"powershell\">param (     $arg0, $arg1 )  Write-Host $arg0 $arg1<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3o\/yl\/zy\/3oylzy5_ukl893oyfcu54fejeaq.png\" alt=\"image\"><\/p>\n<p>  \u0412 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"powershell\">function test {      param (            $arg0, $arg1      ) }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u0432\u0435\u043b\u0438\u043a, \u0431\u043b\u043e\u043a Param() \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0437\u0434\u0438\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"section3\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/font><\/h3>\n<p>  \u041f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u0438\u043f\u0430:<\/p>\n<pre><code class=\"powershell\">param([int]$arg0)<\/code><\/pre>\n<p>  \u0438\u043b\u0438<\/p>\n<pre><code class=\"powershell\">function test ([int]$arg0) { }<\/code><\/pre>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 [parameter()]:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Argument1=value1, Argument2=value2)]     $ParameterName )<\/code><\/pre>\n<p>  \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u2014 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0438 \u0438\u0434\u0443\u0442 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c:<\/p>\n<pre><code class=\"powershell\">param([parameter(Mandatory=$true)][int]$arg0)<\/code><\/pre>\n<p>  \u0438\u043b\u0438<\/p>\n<pre><code class=\"powershell\">function test ([parameter(Mandatory=$true)][int]$arg0) {  }<\/code><\/pre>\n<p>  \u0438\u043b\u0438<\/p>\n<pre><code class=\"powershell\">function test {           parameter([parameter(Mandatory=$true)][int]$arg0) }<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/2j\/7a\/km2j7agackddylgawcafzzho-fq.png\" alt=\"image\"><\/p>\n<p>  Position \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f):<\/p>\n<pre><code class=\"powershell\">param(                     [parameter(Mandatory=$true, Position=0)]                     [int]                     $arg0,                      [parameter(Position=1)]                     [string]                     $arg1,                      [parameter(Position=2)]                     [array]                     $arg2 )<\/code><\/pre>\n<p>  \u0423 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 [Parameter()] \u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_functions_advanced_parameters\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a> Microsoft. \u0422\u0430\u043c \u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043f\u0440\u043e\u0447\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0445 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u0442.\u0434. \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<p>  <strong>[Alias()]<\/strong> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true)]     [alias(&quot;ARG&quot;,&quot;ArgumentName&quot;)]     [string[]]     $arg0 )<\/code><\/pre>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 [string[]] \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u2014 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. <\/p>\n<p>  <strong>[AllowNull()]<\/strong> \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 $null \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true)]     [AllowNull()]     [string]     $arg0 )<\/code><\/pre>\n<p>  <strong>[AllowEmptyString()]<\/strong> \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true)]     [AllowEmptyString()]     [string]     $arg0 )<\/code><\/pre>\n<p>  <strong>[AllowEmptyCollection()]<\/strong> \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true)]     [AllowEmptyCollection()]     [string[]]     $arg0 )<\/code><\/pre>\n<p>  <strong>[ValidatePattern()]<\/strong> \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true)]     [ValidatePattern(&quot;[0-9][0-9][0-9][0-9]&quot;)]     [string[]]     $arg0 )<\/code><\/pre>\n<p>  <strong>[ValidateLength()]<\/strong> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true)]     [ValidateLength(1,10)]     [string]     $arg0 )<\/code><\/pre>\n<p>  <a name=\"section4\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440<\/font><\/h3>\n<p>  \u0412 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/487876\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0446\u0438\u043a\u043b\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 (pipeline). \u0412 PowerShell \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0442\u0435\u0439\u0442\u043c\u0435\u043d\u0442\u043e\u0432), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u0445 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435. \u041f\u043e \u0441\u0443\u0442\u0438 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0441\u0430\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0438\u043b\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043f\u0440\u0435\u043f\u0430\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Get-Help:<\/p>\n<pre><code class=\"powershell\">Get-Help Stop-Process -Parameter Name<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ci\/fg\/4_\/cifg4_8pquaf9x684dyznzxff0m.png\" alt=\"image\"><\/p>\n<p>  \u0427\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b (ByValue \u0438\/\u0438\u043b\u0438 ByPropertyName). \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0432\u0448\u0438\u0439 \u043f\u043e \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0443 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0435\u0433\u043e \u0442\u0438\u043f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f [parameter()] \u0441 \u0431\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 ValueFromPipeline \u0438 ValueFromPipelineByPropertyName, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0432\u043d\u043e $false:<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true,     ValueFromPipeline=$true)]     [string[]]     $Name )<\/code><\/pre>\n<p>  \u0438\u043b\u0438<\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true,     ValueFromPipelineByPropertyName=$true)]     [string[]]     $Name )<\/code><\/pre>\n<p>  ValueFromPipelineByPropertyName \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 ValueFromPipeline: <\/p>\n<pre><code class=\"powershell\">param(     [parameter(Mandatory=$true,     ValueFromPipeline=$true,     ValueFromPipelineByPropertyName=$true)]     [string[]]     $Name )  Write-Host $Name<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ym\/i4\/go\/ymi4gowjn0tz4dpkgzdl5wjxztu.png\" alt=\"image\"><\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043c\u043e\u0433\u0443\u0442 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043b\u044f <a href=\"https:\/\/docs.google.com\/document\/d\/1S4yewdXQ4pisph2J7GT9WafySzPIzZG9_McNHgB83es\/edit?pli=1#heading=h.o9qzjk2d38gv\">\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043d\u0438\u0436\u0435.<\/p>\n<p>  <a name=\"section5\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/font><\/h3>\n<p>  \u0412 \u044f\u0437\u044b\u043a\u0435 PowerShell \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u0440\u0438 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u043a\u043e\u0434\u0430 \u2014 Begin, Process \u0438 End. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"powershell\">function test {    param()    begin {}    process {}    end {} }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u043a Begin, \u043f\u0440\u0438\u0447\u0435\u043c \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0435\u0449\u0435 \u0434\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 $_ \u0438 $PSItem \u0432 \u0431\u043b\u043e\u043a\u0435 Begin \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0438 \u0432 \u0431\u043b\u043e\u043a\u0435 Begin, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u043a Process: \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u043b\u043e\u043a Process \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u0417\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u044b\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u043b\u043e\u043a\u0430 End. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0437 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430:<\/p>\n<pre><code class=\"powershell\">function test {      param(         [Parameter(ValueFromPipeline)]         [string[]]         $Param1,          [string]$Param2     )      begin     {         Write-Host &quot;\u0411\u043b\u043e\u043a Begin&quot;         Write-Host &quot;     \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0447\u0435\u0440\u0435\u0437 pipeline):&quot; $Param1         Write-Host &quot;     \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438):&quot; $Param2     }      process {         Write-Host &quot;\u0411\u043b\u043e\u043a Process&quot;         Write-Host &quot;     \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0447\u0435\u0440\u0435\u0437 pipeline):&quot; $Param1         Write-Host &quot;     \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438):&quot; $Param2     }      end     {         Write-Host &quot;\u0411\u043b\u043e\u043a End&quot;         Write-Host &quot;     \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0447\u0435\u0440\u0435\u0437 pipeline):&quot; $Param1         Write-Host &quot;     \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438):&quot; $Param2     } }<\/code><\/pre>\n<p>  &#8216;\u043e\u0434\u0438\u043d&#8217;, &#8216;\u0434\u0432\u0430&#8217;, &#8216;\u0442\u0440\u0438&#8217; | test -Param2 &#8216;\u0447\u0435\u0442\u044b\u0440\u0435&#8217;<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/aa\/k5\/fa\/aak5fa8wzzrqxrzp4ixi-cybabw.png\" alt=\"image\"><\/p>\n<p>  <a name=\"section6\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u0410\u0442\u0440\u0438\u0431\u0443\u0442 [CmdletBinding()] \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/font><\/h3>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u00ab\u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0445\u00bb \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0441\u0442\u0440\u043e\u0433\u043e \u0433\u043e\u0432\u043e\u0440\u044f) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 [<a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_functions_cmdletbindingattribute\">CmdletBinding()<\/a>]. \u041e\u043d, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 Visual Studio \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0441\u043e\u0431\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u043b\u0430\u0441\u0441\u044b .NET Core. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445, \u043d\u0430 \u043d\u0438\u0445 \u043c\u044b \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f:<\/p>\n<pre><code class=\"powershell\">function &lt;Name&gt; {     [CmdletBinding(ConfirmImpact=&lt;String&gt;,     DefaultParameterSetName=&lt;String&gt;,     HelpURI=&lt;URI&gt;,     SupportsPaging=&lt;Boolean&gt;,     SupportsShouldProcess=&lt;Boolean&gt;,     PositionalBinding=&lt;Boolean&gt;)]      Param ()      Begin{}     Process{}     End{} }<\/code><\/pre>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 [CmdletBinding()] \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.management.automation.cmdletbindingattribute\">CmdletBindingAttribute<\/a> \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b. \u0418\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0435\u0441\u0442\u044c <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_functions_cmdletbindingattribute\">\u043d\u0430 \u0441\u0430\u0439\u0442\u0435<\/a> Microsoft. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 CmdletBinding \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 -Confirm \u0438 -WhatIf (\u0447\u0435\u0440\u0435\u0437 SupportsShouldProcess), -Force, -Verbose \u0438 -Debug, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0442.\u0434. \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. <\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>-Force<\/strong> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439;<\/p>\n<p>  <strong>-WhatIf<\/strong> \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043a\u043e\u043c\u0430\u043d\u0434\u044b) \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  Remove-Item C:\\Windows\\notepad.exe -WhatIf<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ag\/b9\/cl\/agb9cl6mbsaxqvrmwwl_fj1xjrm.png\" alt=\"image\"><\/p>\n<p>  <strong>-Confirm<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<pre><code class=\"powershell\">function Delete-File { [CmdletBinding(     ConfirmImpact = 'High',     SupportsShouldProcess = $true )]     param(         [string]$File,         [switch]$Force     )     if ($Force -or $PSCmdlet.ShouldProcess($File,&quot;Delete file&quot;)) {         Remove-Item $File     } }<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/la\/ie\/oq\/laieoqimwhyv-dtm_l5m0yp6xay.png\" alt=\"image\"><\/p>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 -WhatIf \u0438\/\u0438\u043b\u0438 -Confirm \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 ShouldProcess (SupportsShouldProcess=$true), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u043b\u0438 \u044d\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 -Force, \u043c\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 IF. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 -or \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u2014 \u043c\u0435\u0442\u043e\u0434 ShouldProcess \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0422\u0430\u043a\u0436\u0435 \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 [CmdletBinding()] \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 ConfirmImpact, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0434\u0430 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 -Confirm. \u042d\u0442\u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p>  <strong>None<\/strong> \u0438\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u2014 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -Confirm. <\/p>\n<p>  <strong>Low<\/strong> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0440\u0438\u0441\u043a\u043e\u0432 \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  <strong>Medium<\/strong> \u2014 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0438\u0441\u043a\u043e\u043c \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>  <strong>High<\/strong> \u2014 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0440\u0438\u0441\u043a \u043f\u043e\u0442\u0435\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. <\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0441\u0435\u0441\u0441\u0438\u0438 PowerShell \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0438\u043c (High). \u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 $ConfirmPreference \u0438 \u0435\u0441\u043b\u0438 \u0443 \u043a\u043e\u0434\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439, \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <strong>-Verbose<\/strong> \u0438 <strong>-Debug<\/strong> \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0418\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0441\u0442\u0438\u043b\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0440\u043e Write-Host, \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u044d\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e). \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0445\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 -Verbose \u0438 -Debug \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"powershell\">function Get-Something { [CmdletBinding()]     param()     if ($PSBoundParameters.Verbose) {$VerbosePreference = &quot;Continue&quot;}     if ($PSBoundParameters.Debug) {$DebugPreference = &quot;Continue&quot;}     Write-Verbose &quot;Type some verbose information&quot;     Write-Debug &quot;Type some debug information&quot; }<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $PSBoundParameters. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f $VerbosePreference \u0438 $DebugPreference \u0440\u0430\u0432\u043d\u044b &#8216;SilentlyContinue&#8217;, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u2014 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 &#8216;Continue&#8217;.<\/p>\n<p>  <a name=\"section7\"><\/a><\/p>\n<h3><font color=\"#3AC1EF\">\u041c\u043e\u0434\u0443\u043b\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432<\/font><\/h3>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0442.\u043d. <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/powershell\/scripting\/developer\/module\/how-to-write-a-powershell-script-module\">\u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432<\/a> \u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .psm1. \u0425\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043e\u043d\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f PSModulePath. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0443\u0442\u0438 \u043a \u043d\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p>  Get-ChildItem Env:\\PSModulePath | Format-Table -AutoSize<\/p>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  C:\\Users\\%UserName%\\Documents\\WindowsPowerShell\\Modules<br \/>  C:\\Program Files\\WindowsPowerShell\\Modules<br \/>  C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Modules<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 ModuleName.psm1 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Delete-File \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430, \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 ]C:\\Users\\%UserName%\\Documents\\WindowsPowerShell\\Modules\\ModuleName. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c (\u0431\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f) \u0444\u0430\u0439\u043b\u0430 .psm1. \u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <strong>Import-Module ModuleName<\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u044f Delete-File \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f, \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9j\/5d\/fw\/9j5dfwsxqzf3jeznbl_em53lnpi.png\" alt=\"image\"><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/487876\/\">\u0427\u0430\u0441\u0442\u044c 1: \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Windows PowerShell<\/a><br \/>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/490924\/\">\u0427\u0430\u0441\u0442\u044c 2: \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Windows PowerShell<\/a><\/p>\n<p>  <a href=\"https:\/\/ruvds.com\/ru-rub\/#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1ba\/550\/d25\/1ba550d25e8846ce8805de564da6aa63.png\"><\/a><\/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=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/493366\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/493366\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/493366\/\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/493366\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-b\/i_\/73\/-bi_73lwdxmnzvtveeghrwvtqay.png\"><\/a><\/p>\n<p>  \u0412\u043e <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/490924\/\"><b>\u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430<\/b><\/a> \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u044b \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f PowerShell, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043d\u0435\u043c \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u043e\u0432.<\/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-300601","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300601","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=300601"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300601\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}