{"id":293444,"date":"2019-08-15T15:01:29","date_gmt":"2019-08-15T15:01:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293444"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293444","title":{"rendered":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0445\u043e\u0441\u0442\u043e\u0432 \u043d\u0430 Powershell"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u00ab\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0445\u043e\u0441\u0442\u043e\u0432. \u0411\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0421\u041c\u0421!\u00bb.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/2p\/il\/za\/2pilzao3cmanplkez6dtrphvotg.jpeg\"\/><\/div>\n<p><i>\u0421 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u043e\u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430<\/i><\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e<\/b>: \u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0438 \u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440, \u043d\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u0412\u0441\u0435\u0445 \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <s>\u043f\u043e\u043b\u0435\u0437\u043d\u043e<\/s> \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n<hr\/>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0447\u0435\u043c\u0443 Powershell<\/b><\/p>\n<div class=\"spoiler_text\"><i>\u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 Python, \u043d\u043e \u043e\u043d \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043b\u0438\u0431\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u043b\u0438\u0431\u043e \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a .exe, \u0447\u0442\u043e, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0410 \u0432\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Powershell \u0447\u0430\u0449\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/i>  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041d\u0435 \u0432\u0441\u0435 \u043b\u044e\u0431\u044f\u0442 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\/\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b<\/h3>\n<p>  <i>\u0414\u0443\u043c\u0430\u044e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u044f, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0431\u044b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0432 *nix-\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f GUI.<\/i><\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0441\u0442\u0438 \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Powershell \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e, \u0442\u043e \u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u0430 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043a \u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c GUI. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0436\u043d\u043e, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/pf\/h3\/d-\/pfh3d-h85oekprcwuu0dzdesxfu.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Add-Type -assembly System.Windows.Forms #\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 $main_form = New-Object System.Windows.Forms.Form #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043d\u0430\u0448\u0438\u043c &quot;\u043e\u043a\u043d\u043e\u043c&quot;  #\u0417\u0430\u0434\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b $main_form.Text ='Links up' #\u0418\u043c\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 $main_form.Width = 300 #\u0428\u0438\u0440\u0438\u043d\u0430 \u043e\u043a\u043d\u0430 $main_form.Height = 200 #\u0412\u044b\u0441\u043e\u0442\u0430 \u043e\u043a\u043d\u0430 $main_form.AutoSize = $true #\u0414\u0430\u0435\u043c \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 $main_form.ShowDialog() #\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c &quot;\u043e\u043a\u043d\u043e&quot; <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u044d\u0442\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0435 Windwows-\u043e\u043a\u043d\u043e <s>\u0442\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u044f?<\/s>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/66\/md\/en\/66mdenqsxhgccqee_sxl1zx7bb0.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Add-Type -assembly System.Windows.Forms #\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443  $main_form = New-Object System.Windows.Forms.Form #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u043d\u0430\u0448\u0438\u043c &quot;\u043e\u043a\u043d\u043e\u043c&quot;  #\u0417\u0430\u0434\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b $main_form.Text ='Links up' #\u0418\u043c\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 $main_form.Width = 300 #\u0428\u0438\u0440\u0438\u043d\u0430 \u043e\u043a\u043d\u0430 $main_form.Height = 200 #\u0412\u044b\u0441\u043e\u0442\u0430 \u043e\u043a\u043d\u0430 $main_form.AutoSize = $true #\u0414\u0430\u0435\u043c \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438  $Label = New-Object System.Windows.Forms.Label #\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u043e\u0440\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u0430\u043a \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 Powershell $Label.Text = &quot;\u041f\u0440\u0438\u0432\u0435\u0442! \u042f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0435 Windows-\u043e\u043a\u043d\u043e, \u0430 \u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0442\u044b?&quot; #\u0412\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 $Label.Location  = New-Object System.Drawing.Point(10,65) #\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 (x,y) $Label.AutoSize = $true   $main_form.Controls.Add($Label) #\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a \u0444\u043e\u0440\u043c\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430  $main_form.ShowDialog() #\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u043a\u043e\u0440\u0431\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0435 \u043e\u043a\u043d\u043e<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438<\/h3>\n<p>  \u0422\u0430\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u00ab\u043f\u0438\u043d\u0433\u043e\u0432\u0430\u043b \u042f\u043d\u0434\u0435\u043a\u0441\u00bb \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b *.iso \u043e\u0431\u0437\u0430\u0432\u0451\u043b\u0441\u044f \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u044b\u043c GUI, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u043b\u043e. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0440\u0438\u0441\u0443\u0435\u043c \u0434\u0432\u0435 \u0438\u043a\u043e\u043d\u043a\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/sh\/40\/xh\/sh40xhgqonwm5nvdqqh0jtinzmu.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$PictureBox = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox.width = 10 $PictureBox.height = 10 $PictureBox.location = New-Object System.Drawing.Point(178,12)  #\u0412\u043e\u0442 \u0442\u0443\u0442 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0434\u0435\u043b\u0443 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0443\u0437\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 #&lt;b&gt;test-connection&lt;\/b&gt;, \u0433\u0434\u0435: #-Count - \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 #-computer - IP \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 #-quiet - \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0443\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e Boolean \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 if ((test-connection -Count 1 -computer ya.ru -quiet) -eq $True) { \t$PictureBox.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } Else { \t$PictureBox.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } $PictureBox.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $main_form.Controls.Add($PictureBox) <\/code><\/pre>\n<p>  <s><i>\u041e\u043f\u044f\u0442\u044c \u043d\u0430\u0448\u0438 DNS-\u043d\u0438\u043a\u0438 \u0448\u0430\u043b\u044f\u0442&#8230;<\/i><\/s><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/m2\/ij\/-f\/m2ij-fy3dqgd-s31avukhhzky6e.png\"\/><\/div>\n<p>  \u0418 \u0435\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043d\u043e\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/hu\/90\/_-\/hu90_-mdwepm_j3ckujjlre1xo8.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$Button = New-Object System.Windows.Forms.Button $Button.Location = New-Object System.Drawing.Size(100,150)  $Button.Size = New-Object System.Drawing.Size(80,30) $Button.Text = &quot;Reload&quot;  # \u0412\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e PictureBox \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 $Button.Add_Click({  \tif ((Test-Connection -Count 1 -computer ya.ru -quiet) -eq $True) \t\t{$PictureBox.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox.imageLocation\t= &quot;C:\\Test\\no.png&quot;} \t   \tif ((Test-Connection -Count 1 -computer 8.8.8.8 -quiet) -eq $True) \t\t{$PictureBox1.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox1.imageLocation\t= &quot;C:\\Test\\no.png&quot;}  \t})  $main_form.Controls.Add($Button) <\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/k_\/7q\/_l\/k_7q_lipmrun-isgcadlcfpi2ue.gif\"\/><\/div>\n<p>  <\/p>\n<h3>\u0427\u0443\u0434\u0435\u0441\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d!<s>?<\/s><\/h3>\n<p>  \u0412\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0432 \u043e\u043a\u043e\u043b\u043e \u043f\u043e\u043b\u0443\u0434\u044e\u0436\u0438\u043d\u044b \u0445\u043e\u0441\u0442\u043e\u0432 \u044f \u0432\u0434\u0440\u0443\u0433 \u043f\u043e\u043d\u044f\u043b \u043e\u0434\u043d\u0443 \u0432\u0435\u0449\u044c \u2014 \u0430 \u0432\u0435\u0434\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u0441\u044f, \u0445\u043e\u0441\u0442\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442 \u0438 \u043c\u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e, \u044d\u0442\u043e \u0436\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b <s>\u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e<\/s> \u0432\u044b \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0440\u0435\u043b\u0438\u0449\u0435 \u043d\u0435 \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u043e\u043d\u0435\u0440\u0432\u043d\u044b\u0445<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">Add-Type -assembly System.Windows.Forms #\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443  $main_form = New-Object System.Windows.Forms.Form #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u043d\u0430\u0448\u0438\u043c &quot;\u043e\u043a\u043d\u043e\u043c&quot;  #\u0417\u0430\u0434\u0430\u0435\u043c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b $main_form.Text ='Links up' #\u0418\u043c\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 $main_form.Width = 300 #\u0428\u0438\u0440\u0438\u043d\u0430 \u043e\u043a\u043d\u0430 $main_form.Height = 200 #\u0412\u044b\u0441\u043e\u0442\u0430 \u043e\u043a\u043d\u0430 $main_form.AutoSize = $true #\u0414\u0430\u0435\u043c \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438  $Label = New-Object System.Windows.Forms.Label #\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u043e\u0440\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u0430\u043a \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 Powershell $Label.Text = &quot;ya.ru\t\t............................&quot; #\u0412\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442  $Label.Location  = New-Object System.Drawing.Point(15,10) #\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 (x,y) $Label.AutoSize = $true   $Label1 = New-Object System.Windows.Forms.Label #\u0412\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0444\u043e\u0440\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u0430\u043a \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 Powershell $Label1.Text = &quot;8.8.8.8\t\t............................&quot; #\u0412\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 googl-\u043e\u0432\u0441\u043a\u0438\u0439 DNS-\u043d\u0438\u043a $Label1.Location  = New-Object System.Drawing.Point(15,30) #\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u043e\u0440\u043c\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 (x,y) $Label1.AutoSize = $true   $Label2 = New-Object System.Windows.Forms.Label $Label2.Text = &quot;192.168.x.x\t............................&quot; $Label2.Location  = New-Object System.Drawing.Point(15,50) $Label2.AutoSize = $true  $Label3 = New-Object System.Windows.Forms.Label $Label3.Text = &quot;192.168.x.x\t............................&quot; $Label3.Location  = New-Object System.Drawing.Point(15,70) $Label3.AutoSize = $true  $Label4 = New-Object System.Windows.Forms.Label $Label4.Text = &quot;10.0.x.x\t ............................&quot; $Label4.Location  = New-Object System.Drawing.Point(15,90) $Label4.AutoSize = $true  $Label5 = New-Object System.Windows.Forms.Label $Label5.Text = &quot;162.102.x.x\t ............................&quot; $Label5.Location  = New-Object System.Drawing.Point(15,110) $Label5.AutoSize = $true  $PictureBox = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox.width = 10 $PictureBox.height = 10  #\u0412\u043e\u0442 \u0442\u0443\u0442 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0434\u0435\u043b\u0443 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0443\u0437\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 #&lt;b&gt;test-connection&lt;\/b&gt;, \u0433\u0434\u0435: #-Count - \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043a\u043e\u043b-\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 #-computer - IP \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 #-quiet - \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0443\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e Boolean \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 $PictureBox.location = New-Object System.Drawing.Point(235,12) if ((test-connection -Count 1 -computer ya.ru -quiet) -eq $True) { \t$PictureBox.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } Else { \t$PictureBox.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } $PictureBox.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $PictureBox1 = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox1.width = 10 $PictureBox1.height = 10 $PictureBox1.location = New-Object System.Drawing.Point(235,32) if ((test-connection -Count 1 -computer 8.8.8.8 -quiet) -eq $True) { \t$PictureBox1.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } Else { \t$PictureBox1.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } $PictureBox1.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $PictureBox2 = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox2.width = 10 $PictureBox2.height = 10 $PictureBox2.location = New-Object System.Drawing.Point(235,52) if ((test-connection -Count 1 -computer 192.168.x.x -quiet) -eq $True) { \t$PictureBox2.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } Else { \t$PictureBox2.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } $PictureBox2.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $PictureBox3 = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox3.width = 10 $PictureBox3.height = 10 $PictureBox3.location = New-Object System.Drawing.Point(235,72) if ((test-connection -Count 1 -computer 192.168.x.x -quiet) -eq $True) { \t$PictureBox3.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } Else { \t$PictureBox3.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } $PictureBox3.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $PictureBox4 = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox4.width = 10 $PictureBox4.height = 10 $PictureBox4.location = New-Object System.Drawing.Point(235,92) if ((test-connection -Count 1 -computer 10.0.x.x -quiet) -eq $True) { \t$PictureBox4.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } Else { \t$PictureBox4.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  } $PictureBox1.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $PictureBox5 = New-Object system.Windows.Forms.PictureBox #\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e $PictureBox5.width = 10 $PictureBox5.height = 10 $PictureBox5.location = New-Object System.Drawing.Point(235,112) if ((test-connection -Count 1 -computer 162.102.x.x -quiet) -eq $True) { \t$PictureBox5.imageLocation = &quot;C:\\Test\\yes.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  \t} Else { \t$PictureBox5.imageLocation = &quot;C:\\Test\\no.png&quot; #\u041e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435  \t} $PictureBox5.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::zoom  $Button = New-Object System.Windows.Forms.Button $Button.Location = New-Object System.Drawing.Size(100,150)  $Button.Size = New-Object System.Drawing.Size(80,30) $Button.Text = &quot;Reload&quot;  # \u0412\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e PictureBox \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 $Button.Add_Click({  \tif ((Test-Connection -Count 1 -computer ya.ru -quiet) -eq $True) \t\t{$PictureBox.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox.imageLocation\t= &quot;C:\\Test\\no.png&quot;} \t   \tif ((Test-Connection -Count 1 -computer 8.8.8.8 -quiet) -eq $True) \t\t{$PictureBox1.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox1.imageLocation\t= &quot;C:\\Test\\no.png&quot;}  \tif ((Test-Connection -Count 1 -computer 192.168.x.x -quiet) -eq $True) \t\t{$PictureBox2.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox2.imageLocation\t= &quot;C:\\Test\\no.png&quot;}  \tif ((Test-Connection -Count 1 -computer 192.168.x.x -quiet) -eq $True) \t\t{$PictureBox3.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox3.imageLocation\t= &quot;C:\\Test\\no.png&quot;}  \tif ((Test-Connection -Count 1 -computer 10.0.x.x -quiet) -eq $True) \t\t{$PictureBox4.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox4.imageLocation\t= &quot;C:\\Test\\no.png&quot;}  \tif ((Test-Connection -Count 1 -computer 162.102.x.x -quiet) -eq $True) \t\t{$PictureBox5.imageLocation\t= &quot;C:\\Test\\yes.png&quot;} \tElse {$PictureBox5.imageLocation\t= &quot;C:\\Test\\no.png&quot;} \t})  $main_form.Controls.Add($Label) #\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a \u0444\u043e\u0440\u043c\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 $main_form.Controls.Add($Label1) $main_form.Controls.Add($Label2) $main_form.Controls.Add($Label3) $main_form.Controls.Add($Label4) $main_form.Controls.Add($Label5) $main_form.Controls.Add($PictureBox) $main_form.Controls.Add($PictureBox1) $main_form.Controls.Add($PictureBox2) $main_form.Controls.Add($PictureBox3) $main_form.Controls.Add($PictureBox4) $main_form.Controls.Add($PictureBox5) $main_form.Controls.Add($Button)  $main_form.ShowDialog() #\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u043a\u043e\u0440\u0431\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0435 \u043e\u043a\u043d\u043e <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u043e\u0442\u0443 \u0438 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043d\u043e\u0441\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0430 \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e:<\/p>\n<pre><code class=\"plaintext\">$script_path\t= &quot;C:\\Test\\PS ping&quot;  #\u041f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u0435\u043c \u0432 \u0444\u0438\u043d\u043a\u0446\u0438\u044e \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 PictureBox \u0438 IP-\u0430\u0434\u0440\u0435\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. #\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043e\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. function get_status($PictureBox,$path_ip) { \tif ((Test-Connection -Count 1 -computer $path_ip -quiet) -eq $True) \t\t{$PictureBox.imageLocation\t= $script_path + &quot;\\yes.png&quot;} \tElse {$PictureBox.imageLocation\t= $script_path + &quot;\\no.png&quot;}  \t} <\/code><\/pre>\n<p>  \u0412\u044b\u043d\u0435\u0441\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0445\u043e\u0441\u0442\u0435 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0439\u043b path.txt, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432 \u0432\u0438\u0434\u0435 \u00abip\/host-functional-name\/\u00bb, \u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u044b. \u0422\u0430\u043a \u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e Y \u0431\u043e\u043b\u0435\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c. \u0412\u0441\u0435 \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Label`\u044b \u0438 checkbox`\u044b \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/ob\/bq\/f3\/obbqf3swvwgscx0u1rfnck1enpo.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"plaintext\">#\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e, \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438\u0434\u0443\u0442: \u043e\u0431\u044a\u0435\u043a\u0442 Label, IP-\u0430\u0434\u0440\u0435\u0441\u0441, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043f\u043e \u043e\u0441\u0438 Y Function Create_line($label,$path_ip,$caption, $top){  \t$label.Location = New-Object System.Drawing.Point(1, $top) \t$label.text = $path_ip+$caption \t$label.font = $font \t$Label.AutoSize = $true \t} #\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u044e, \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438\u0434\u0443\u0442: \u043e\u0431\u044a\u0435\u043a\u0442 PictureBox, IP-\u0430\u0434\u0440\u0435\u0441\u0441 \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043f\u043e \u043e\u0441\u0438 Y Function Create_link($PictureBox,$path_ip, $top){  \t$PictureBox.width\t= 10 \t$PictureBox.height\t= 10 \t$PictureBox.location\t= New-Object System.Drawing.Point(210,$top) \tget_status -PictureBox $PictureBox -path_ip $path_ip \t$PictureBox.SizeMode\t= [System.Windows.Forms.PictureBoxSizeMode]::zoom \t}  $line = Get-content -LiteralPath $script_path&quot;\\path.txt&quot; #\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0445\u043e\u0441\u0442\u0430\u0445 $len = $line.Length\t#\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0434\u043b\u0438\u043d\u0443, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u0438\u043d \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438  $i = 0  #\u0434\u0430\u043b\u0435\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 $ip = @()\t#\u043c\u0430\u0441\u0441\u0438\u0432 ip $capt = @()\t#\u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f $Labels =@()\t#\u043c\u0430\u0441\u0441\u0438\u0432 Label $PictureBoxs =@()\t#\u043c\u0430\u0441\u0441\u0438\u0432 PictureBox  while($i -lt $len){ \t$f = $line[$i].IndexOf(&quot;\/&quot;) #\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \t$l = $line[$i].LastIndexOf(&quot;\/&quot;)\t#\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u043e\u043d\u0446\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \t$ip += $line[$i].Substring(0,$f)\t#\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c ip \t$capt += $line[$i].Substring($f+1,$l-$f-1)\t#\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435  \t#\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0435 Label \tCreate_line -label ($label_obj = New-Object System.Windows.Forms.Label) -path_ip $ip[$i] -caption $capt[$i] -top $label_from_top \t#\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0435 PictureBox \tCreate_link -PictureBox ($PictureBox_obj = New-Object system.Windows.Forms.PictureBox) -path_ip $ip[$i] -top $label_from_top  \t$label_from_top += 15\t#\u0434\u0435\u043b\u0430\u0435\u043c &quot;\u0448\u0430\u0433&quot; \u043f\u043e \u043e\u0441\u0438 Y  \t$Labels\t+= $label_obj\t#\u0432\u043d\u043e\u0441\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 Label \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \t$PictureBoxs\t+= $PictureBox_obj\t#\u0432\u043d\u043e\u0441\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 PictureBox \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \t$main_form.Controls.Add($Labels[$i]) \t$main_form.Controls.Add($PictureBoxs[$i]) \t$i\t+=1 \t} <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u0438 \u043d\u0435\u043c\u043e\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/7c\/zt\/0v\/7czt0vf-_y2yp7fdtd5gpwhejss.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"plaintext\">$Label0\t= New-Object System.Windows.Forms.Label $Label0.Text\t= Get-Date $Label0.Location\t= New-Object System.Drawing.Point(80,180) $Label0.AutoSize\t= $true $main_form.Controls.Add($Label0) $Button.Add_Click({  \twhile($i -lt $len){ \t\tget_status -PictureBox $PictureBoxs[$i] -path_ip $ip[$i] \t\t$i +=1 \t\t} \t$Label0.Text\t= Get-Date  \t}) <\/code><\/pre>\n<p>  \u0410 \u0442\u0430\u043a \u0436\u0435 \u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0444\u0438\u0442\u0447\u0443<s>\u043d\u0435 \u0431\u0430\u0433<\/s>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u0441\u043e\u043e\u0431\u0449\u0430\u043b\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u043d\u043e \u0438 \u0432\u043e\u043f\u0438\u043b\u043e \u0438\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u043e\u0432.<\/p>\n<pre><code class=\"plaintext\">Add-Type -AssemblyName System.Speech $voice\t= New-Object System.Speech.Synthesis.SpeechSynthesizer $voice.Rate\t= 5 $voice.Speak(&quot;\u0412\u043e\u0440\u043d\u0438\u043d\u0433! \u0412\u043e\u0440\u043d\u0438\u043d\u0433! \u0411\u0430\u0439\u0437 \u0438\u0437 \u0430\u043d\u0434\u0435\u0440 \u0430\u0442\u0442\u0430\u043a!&quot;) <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u043a\u0440\u0430\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u043c\u0443<s>\u0443\u0434\u043e\u0431\u043d\u043e\u043c\u0443 \u043c\u043d\u0435<\/s> \u0432\u0438\u0434\u0443, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">Add-Type -AssemblyName System.Speech Add-Type -assembly System.Windows.Forms  $script_path\t= &quot;C:\\PS ping&quot; $label_from_top\t= 10 $voice\t= New-Object System.Speech.Synthesis.SpeechSynthesizer $voice.Rate\t= 5  #\u041f\u0435\u0440\u0435\u0435\u0437\u0436\u0430\u0435\u043c \u0432 \u0444\u0438\u043d\u043a\u0446\u0438\u044e \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 PictureBox \u0438 IP-\u0430\u0434\u0440\u0435\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. #\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043e\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. function get_status($PictureBox,$path_ip) { \tif ((Test-Connection -Count 1 -computer $path_ip -quiet) -eq $True) { \t\t$PictureBox.imageLocation\t= $script_path + &quot;\\yes.png&quot; \t\t} \tElse { \t\t$PictureBox.imageLocation\t= $script_path + &quot;\\no.png&quot; \t\t$voice.Speak(&quot;\u041e\u0448\u0438\u0431\u043a\u0430! \u0425\u043e\u0441\u0442 &quot; + $path_ip + &quot;, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d!&quot;) \t\t} \t}  #\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e, \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438\u0434\u0443\u0442: \u043e\u0431\u044a\u0435\u043a\u0442 Label, IP-\u0430\u0434\u0440\u0435\u0441\u0441, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043f\u043e \u043e\u0441\u0438 Y Function Create_line($label,$path_ip,$caption, $top){  \t$label.Location\t= New-Object System.Drawing.Point(1, $top) \t$label.text\t= $path_ip+$caption \t$label.font\t= $font \t$Label.AutoSize\t= $true \t}  #\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u044e, \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438\u0434\u0443\u0442: \u043e\u0431\u044a\u0435\u043a\u0442 PictureBox, IP-\u0430\u0434\u0440\u0435\u0441\u0441 \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043f\u043e \u043e\u0441\u0438 Y Function Create_link($PictureBox,$path_ip, $top){  \t$PictureBox.width\t= 10 \t$PictureBox.height\t= 10 \t$PictureBox.location\t= New-Object System.Drawing.Point(210,$top) \tget_status -PictureBox $PictureBox -path_ip $path_ip \t$PictureBox.SizeMode\t= [System.Windows.Forms.PictureBoxSizeMode]::zoom \t}  $main_form\t= New-Object System.Windows.Forms.Form $main_form.Text ='Links up' #\u0418\u043c\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 $main_form.Width = 300 #\u0428\u0438\u0440\u0438\u043d\u0430 \u043e\u043a\u043d\u0430 $main_form.Height = 200 #\u0412\u044b\u0441\u043e\u0442\u0430 \u043e\u043a\u043d\u0430 $main_form.AutoSize = $true #\u0414\u0430\u0435\u043c \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 $main_form.TopMost\t= $true #\u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430, \u043e\u043d\u0430 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043e\u043a\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0445 \u0434\u0440\u0443\u0433\u0438\u0445  $line = Get-content -LiteralPath $script_path&quot;\\path.txt&quot; #\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0445\u043e\u0441\u0442\u0430\u0445 $len = $line.Length\t#\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0434\u043b\u0438\u043d\u0443, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u0438\u043d \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438  $i = 0  #\u0434\u0430\u043b\u0435\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 $ip\t= @()\t#\u043c\u0430\u0441\u0441\u0438\u0432 ip $capt\t= @()\t#\u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f $Labels\t=@()\t#\u043c\u0430\u0441\u0441\u0438\u0432 Label $PictureBoxs\t=@()\t#\u043c\u0430\u0441\u0441\u0438\u0432 PictureBox  while($i -lt $len){ \t$f\t= $line[$i].IndexOf(&quot;\/&quot;) #\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \t$l\t= $line[$i].LastIndexOf(&quot;\/&quot;)\t#\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u043e\u043d\u0446\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \t$ip\t+= $line[$i].Substring(0,$f)\t#\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c ip \t$capt\t+= $line[$i].Substring($f+1,$l-$f-1)\t#\u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435  \t#\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0435 Label \tCreate_line -label ($label_obj = New-Object System.Windows.Forms.Label) -path_ip $ip[$i] -caption $capt[$i] -top $label_from_top \t#\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0435 PictureBox \tCreate_link -PictureBox ($PictureBox_obj = New-Object system.Windows.Forms.PictureBox) -path_ip $ip[$i] -top $label_from_top  \t$label_from_top\t+= 15\t#\u0434\u0435\u043b\u0430\u0435\u043c &quot;\u0448\u0430\u0433&quot; \u043f\u043e \u043e\u0441\u0438 Y  \t$Labels\t+= $label_obj\t#\u0432\u043d\u043e\u0441\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 Label \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \t$PictureBoxs\t+= $PictureBox_obj\t#\u0432\u043d\u043e\u0441\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 PictureBox \u0432 \u043e\u0431\u0449\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \t$main_form.Controls.Add($Labels[$i]) \t$main_form.Controls.Add($PictureBoxs[$i]) \t$i\t+=1 }  #\u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 $Label0\t= New-Object System.Windows.Forms.Label $Label0.Text\t= Get-Date $Label0.Location\t= New-Object System.Drawing.Point(80,180) $Label0.AutoSize\t= $true   # \u0412\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e PictureBox \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 $Button\t= New-Object System.Windows.Forms.Button $Button.Location\t= New-Object System.Drawing.Size(100,200) $Button.Size\t= New-Object System.Drawing.Size(80,30) $Button.Text\t= &quot;Reload&quot;  $Button.Add_Click({  \twhile($i -lt $len){ \t\tget_status -PictureBox $PictureBoxs[$i] -path_ip $ip[$i] \t\t$i\t+=1 \t\t} \t$i\t= 0 \t$Label0.Text\t= Get-Date  })  $main_form.Controls.Add($Button) $main_form.Controls.Add($Label0)  $main_form.ShowDialog() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/h3>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u0442\u0430\u043a\u043e\u0435 \u0447\u0443\u0442\u044c-\u043b\u0438 \u043d\u0435 \u0441 \u043f\u0435\u043b\u0435\u043d\u043e\u043a \u0434\u0435\u043b\u0430\u043b\u0438, \u0442\u043e \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u044f \u2014 \u043d\u0435 \u0434\u0435\u043b\u0430\u043b. \u041d\u043e \u044f \u0433\u043e\u0442\u043e\u0432 \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e, \u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0432 \u0431\u044b\u0442\u0443 \u0443\u0442\u0438\u043b\u0438\u0442\u0443. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u0435\u0449\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u043e\u0432 \u0438\u0437 GUI, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <s>\u0442\u0430\u043a\u0438 \u0442\u043e \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/s> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u00ab\u0442\u044b\u043a\u0430\u0442\u044c\u00bb \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043d\u0435 \u0432\u0435\u0448\u0430\u043b\u043e \u00abpowershell.exe\u00bb.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/UlahinAlex\/PowerShell_ping\">GitHub<\/a><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \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\/post\/463777\/\"> https:\/\/habr.com\/ru\/post\/463777\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412\u0441\u0435\u043c \u0434\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u00ab\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0445\u043e\u0441\u0442\u043e\u0432. \u0411\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0421\u041c\u0421!\u00bb.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"https:\/\/habrastorage.org\/webt\/2p\/il\/za\/2pilzao3cmanplkez6dtrphvotg.jpeg\"\/><\/div>\n<p><i>\u0421 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u043e\u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430<\/i><\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e<\/b>: \u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0438 \u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440, \u043d\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430.<\/p>\n<p>  \u0412\u0441\u0435\u0445 \u043a\u043e\u043c\u0443 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <s>\u043f\u043e\u043b\u0435\u0437\u043d\u043e<\/s> \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u043e, \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n<hr\/>\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-293444","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293444","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=293444"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293444\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}