{"id":308243,"date":"2020-08-10T15:00:17","date_gmt":"2020-08-10T15:00:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308243"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308243","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430 Powershell"},"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\/post\/514590\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_m\/ku\/5h\/_mku5hwc7tbnyldc8rnbcbexlau.png\"><\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 10 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u041e\u0421 Microsoft Windows 8.1. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0443\u0447\u0435\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u041f\u041e \u0438 \u043e\u0431\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u043e\u0431\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0435\u0441\u0442\u044c 2 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0438 \u0421\u0442\u0443\u0434\u0435\u043d\u0442. \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0443 \u0421\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u041f\u041e. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u0440\u0443\u0436\u0434\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0447\u0438\u0441\u0442\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0421\u0442\u0443\u0434\u0435\u043d\u0442, \u044d\u0442\u0430 \u0443\u0447\u0435\u0442\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e. \u042d\u0442\u043e \u0432\u043b\u0435\u0447\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u0440\u0435\u0448\u0438\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0431\u0435\u0437 ActiveDirectory \u0438 \u0441\u043e\u0431\u0440\u0430\u043b \u0432 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u044b\u0441\u043a\u0430\u043b \u0432 \u0441\u0435\u0442\u0438.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u044f\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d PS 4 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u0432\u0441\u0435\u0437\u043d\u0430\u044e\u0449\u0435\u0433\u043e \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:  <\/p>\n<ol>\n<li> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/powershell\/scripting\/windows-powershell\/install\/installing-windows-powershell?view=powershell-7#upgrading-existing-windows-powershell\" rel=\"nofollow\"> Windows Management Framework 5.1<\/a> <\/li>\n<li> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0438\u0441\u0438\u044e <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\/releases\" rel=\"nofollow\">PowerShell<\/a> <\/li>\n<\/ol>\n<h2>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/h2>\n<p>  <\/p>\n<ol>\n<li> \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435\/\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <\/li>\n<li> \u0410\u0432\u0442\u043e\u0432\u0445\u043e\u0434 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <\/li>\n<li> \u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <\/li>\n<\/ol>\n<h3>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435\/\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  \u041d\u0430\u0447\u0430\u043b \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c 2 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (<a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.localaccounts\/new-localuser?view=powershell-5.1&amp;viewFallbackFrom=powershell-7.1\" rel=\"nofollow\">New-LocalUser<\/a>) \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 (<a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.localaccounts\/get-localgroupmember?view=powershell-5.1&amp;viewFallbackFrom=powershell-7.1\" rel=\"nofollow\">Add-LocalGroupMember)<\/a>. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"powershell\">Function New-User {     &lt;#     .SYNOPSIS         \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438     .EXAMPLE         #New-User &quot;Student&quot; &quot;Student&quot;     .PARAMETER Name         \u0418\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Password         \u041f\u0430\u0440\u043e\u043b\u044c (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;      [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Name,         [PARAMETER(Mandatory=$True)][String]$Password         )      $Pwd = convertto-securestring $Password -asplaintext -force     $GroupSID = &quot;S-1-5-32-545&quot;     New-LocalUser -User $Name -AccountNeverExpires:$true -FullName $Name -Password $Pwd -PasswordNeverExpires:$true     Add-LocalGroupMember -SID $GroupSID -Member $Name      Write-Host &quot;-- \u0421\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $Name \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c $Password&quot; -foregroundcolor Green } <\/code><\/pre>\n<p>  \u0412 \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e \u043f\u043e SID, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b, \u0447\u0442\u043e SID \u0433\u0440\u0443\u043f\u043f\u044b \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0435\u0437\u0434\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u2014 S-1-5-32-545.<\/p>\n<p>  \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e WMI \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 Win32_UserProfile \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b \u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<pre><code class=\"powershell\">Function Remove-Users {     &lt;#     .SYNOPSIS         \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b \u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438         \u0423\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u043e\u043b\u043e\u0433 \u0438 \u0440\u0435\u0435\u0441\u0442\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439     .EXAMPLE         #Remove-Users     #&gt;     [CmdletBinding()]  \t$UsersProfiles = Get-WMIObject -class Win32_UserProfile -ComputerName $env:COMPUTERNAME | Where {!($_.Loaded) -and !($_.Special)} \tforeach($Usr in $UsersProfiles) {         \t$UsrName = $Usr.LocalPath.Split(&quot;\\&quot;)[2]         \tWrite-Host &quot;-- \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f $UsrName ...&quot; -foregroundcolor Green         \tRemove-LocalUser -Name $UsrName \t\tRemove-WmiObject -Path $Usr.__PATH         \tWrite-Host &quot;-- \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $UsrName \u0443\u0434\u0430\u043b\u0435\u043d&quot; -foregroundcolor Green \t} } <\/code><\/pre>\n<h3>\u0410\u0432\u0442\u043e\u0432\u0445\u043e\u0434 (\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u043d) \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u043e\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0435\u0441\u0442\u0440\u0430 HKEY_LOCAL_MACHINE. \u042d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b \u0432 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"powershell\">Function Set-AutoLogon {     &lt;#     .SYNOPSIS         \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043b\u043a\u044e\u0447\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0432\u0445\u043e\u0434 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .EXAMPLE         #Set-AutoLogon  &quot;Student&quot; &quot;Student&quot;     .PARAMETER Name         \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Password         \u041f\u0430\u0440\u043e\u043b\u044c (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;      [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Name,         [PARAMETER(Mandatory=$True)][String]$Password         )      $PathToWinlogon = &quot;HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&quot;     New-ItemProperty -Path $PathToWinlogon -Name AutoAdminLogon  -Value 1 -PropertyType &quot;String&quot;     New-ItemProperty -Path $PathToWinlogon -Name DefaultUserName -Value $Name -PropertyType &quot;String&quot;     New-ItemProperty -Path $PathToWinlogon -Name DefaultPassword -Value $Password -PropertyType &quot;String&quot; } <\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430:  <\/p>\n<ol>\n<li> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438 <\/li>\n<li> \u0417\u0430\u043f\u0440\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435 <\/li>\n<li> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <\/li>\n<\/ol>\n<p>  \u042f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043d\u043e \u043f\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u0441\u043a. \u041d\u043e \u0442\u0430\u0441\u043a \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 PS \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0432\u0435\u0441\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0448\u0435\u043b \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0442\u0440\u043e\u043f\u0438\u043d\u043a\u043e\u0439:  <\/p>\n<pre><code class=\"powershell\">schtasks \/create \/tn LogonUserSettings \/tr &quot;pwsh C:\\Scripts\\Settings.ps1&quot; \/sc onlogon \/ru $env:USERDOMAIN\\$UserName \/rp $Password \/f <\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 Windows \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0445\u043e\u0434 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f (SeBatchLogonRight). \u041f\u043e\u0438\u0441\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 <a href=\"https:\/\/stackoverflow.com\/a\/10188472\" rel=\"nofollow\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443<\/a>:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">LsaWrapper<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"powershell\">$Source = @' using System; using System.Collections.Generic; using System.Text;  namespace MyLsaWrapper {     using System.Runtime.InteropServices;     using System.Security;     using System.Management;     using System.Runtime.CompilerServices;     using System.ComponentModel;      using LSA_HANDLE = IntPtr;      [StructLayout(LayoutKind.Sequential)]     struct LSA_OBJECT_ATTRIBUTES     {         internal int Length;         internal IntPtr RootDirectory;         internal IntPtr ObjectName;         internal int Attributes;         internal IntPtr SecurityDescriptor;         internal IntPtr SecurityQualityOfService;     }     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]     struct LSA_UNICODE_STRING     {         internal ushort Length;         internal ushort MaximumLength;         [MarshalAs(UnmanagedType.LPWStr)]         internal string Buffer;     }     sealed class Win32Sec     {         [DllImport(&quot;advapi32&quot;, CharSet = CharSet.Unicode, SetLastError = true),         SuppressUnmanagedCodeSecurityAttribute]         internal static extern uint LsaOpenPolicy(         LSA_UNICODE_STRING[] SystemName,         ref LSA_OBJECT_ATTRIBUTES ObjectAttributes,         int AccessMask,         out IntPtr PolicyHandle         );          [DllImport(&quot;advapi32&quot;, CharSet = CharSet.Unicode, SetLastError = true),         SuppressUnmanagedCodeSecurityAttribute]         internal static extern uint LsaAddAccountRights(         LSA_HANDLE PolicyHandle,         IntPtr pSID,         LSA_UNICODE_STRING[] UserRights,         int CountOfRights         );          [DllImport(&quot;advapi32&quot;, CharSet = CharSet.Unicode, SetLastError = true),         SuppressUnmanagedCodeSecurityAttribute]         internal static extern int LsaLookupNames2(         LSA_HANDLE PolicyHandle,         uint Flags,         uint Count,         LSA_UNICODE_STRING[] Names,         ref IntPtr ReferencedDomains,         ref IntPtr Sids         );          [DllImport(&quot;advapi32&quot;)]         internal static extern int LsaNtStatusToWinError(int NTSTATUS);          [DllImport(&quot;advapi32&quot;)]         internal static extern int LsaClose(IntPtr PolicyHandle);          [DllImport(&quot;advapi32&quot;)]         internal static extern int LsaFreeMemory(IntPtr Buffer);      }     \/\/\/ &lt;summary&gt;     \/\/\/ This class is used to grant &quot;Log on as a service&quot;, &quot;Log on as a batchjob&quot;, &quot;Log on localy&quot; etc.     \/\/\/ to a user.     \/\/\/ &lt;\/summary&gt;     public sealed class LsaWrapper : IDisposable     {         [StructLayout(LayoutKind.Sequential)]         struct LSA_TRUST_INFORMATION         {             internal LSA_UNICODE_STRING Name;             internal IntPtr Sid;         }         [StructLayout(LayoutKind.Sequential)]         struct LSA_TRANSLATED_SID2         {             internal SidNameUse Use;             internal IntPtr Sid;             internal int DomainIndex;             uint Flags;         }          [StructLayout(LayoutKind.Sequential)]         struct LSA_REFERENCED_DOMAIN_LIST         {             internal uint Entries;             internal LSA_TRUST_INFORMATION Domains;         }          enum SidNameUse : int         {             User = 1,             Group = 2,             Domain = 3,             Alias = 4,             KnownGroup = 5,             DeletedAccount = 6,             Invalid = 7,             Unknown = 8,             Computer = 9         }          enum Access : int         {             POLICY_READ = 0x20006,             POLICY_ALL_ACCESS = 0x00F0FFF,             POLICY_EXECUTE = 0X20801,             POLICY_WRITE = 0X207F8         }         const uint STATUS_ACCESS_DENIED = 0xc0000022;         const uint STATUS_INSUFFICIENT_RESOURCES = 0xc000009a;         const uint STATUS_NO_MEMORY = 0xc0000017;          IntPtr lsaHandle;          public LsaWrapper()             : this(null)         { }         \/\/ \/\/ local system if systemName is null         public LsaWrapper(string systemName)         {             LSA_OBJECT_ATTRIBUTES lsaAttr;             lsaAttr.RootDirectory = IntPtr.Zero;             lsaAttr.ObjectName = IntPtr.Zero;             lsaAttr.Attributes = 0;             lsaAttr.SecurityDescriptor = IntPtr.Zero;             lsaAttr.SecurityQualityOfService = IntPtr.Zero;             lsaAttr.Length = Marshal.SizeOf(typeof(LSA_OBJECT_ATTRIBUTES));             lsaHandle = IntPtr.Zero;             LSA_UNICODE_STRING[] system = null;             if (systemName != null)             {                 system = new LSA_UNICODE_STRING[1];                 system[0] = InitLsaString(systemName);             }              uint ret = Win32Sec.LsaOpenPolicy(system, ref lsaAttr,             (int)Access.POLICY_ALL_ACCESS, out lsaHandle);             if (ret == 0)                 return;             if (ret == STATUS_ACCESS_DENIED)             {                 throw new UnauthorizedAccessException();             }             if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))             {                 throw new OutOfMemoryException();             }             throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));         }          public void AddPrivileges(string account, string privilege)         {             IntPtr pSid = GetSIDInformation(account);             LSA_UNICODE_STRING[] privileges = new LSA_UNICODE_STRING[1];             privileges[0] = InitLsaString(privilege);             uint ret = Win32Sec.LsaAddAccountRights(lsaHandle, pSid, privileges, 1);             if (ret == 0)                 return;             if (ret == STATUS_ACCESS_DENIED)             {                 throw new UnauthorizedAccessException();             }             if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))             {                 throw new OutOfMemoryException();             }             throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));         }          public void Dispose()         {             if (lsaHandle != IntPtr.Zero)             {                 Win32Sec.LsaClose(lsaHandle);                 lsaHandle = IntPtr.Zero;             }             GC.SuppressFinalize(this);         }         ~LsaWrapper()         {             Dispose();         }         \/\/ helper functions          IntPtr GetSIDInformation(string account)         {             LSA_UNICODE_STRING[] names = new LSA_UNICODE_STRING[1];             LSA_TRANSLATED_SID2 lts;             IntPtr tsids = IntPtr.Zero;             IntPtr tdom = IntPtr.Zero;             names[0] = InitLsaString(account);             lts.Sid = IntPtr.Zero;             \/\/Console.WriteLine(&quot;String account: {0}&quot;, names[0].Length);             int ret = Win32Sec.LsaLookupNames2(lsaHandle, 0, 1, names, ref tdom, ref tsids);             if (ret != 0)                 throw new Win32Exception(Win32Sec.LsaNtStatusToWinError(ret));             lts = (LSA_TRANSLATED_SID2)Marshal.PtrToStructure(tsids,             typeof(LSA_TRANSLATED_SID2));             Win32Sec.LsaFreeMemory(tsids);             Win32Sec.LsaFreeMemory(tdom);             return lts.Sid;         }          static LSA_UNICODE_STRING InitLsaString(string s)         {             \/\/ Unicode strings max. 32KB             if (s.Length &gt; 0x7ffe)                 throw new ArgumentException(&quot;String too long&quot;);             LSA_UNICODE_STRING lus = new LSA_UNICODE_STRING();             lus.Buffer = s;             lus.Length = (ushort)(s.Length * sizeof(char));             lus.MaximumLength = (ushort)(lus.Length + sizeof(char));             return lus;         }     }     public class LsaWrapperCaller     {         public static void AddPrivileges(string account, string privilege)         {             using (LsaWrapper lsaWrapper = new LsaWrapper())             {                 lsaWrapper.AddPrivileges(account, privilege);             }         }     } } '@  Add-Type -TypeDefinition $Source [MyLsaWrapper.LsaWrapperCaller]::AddPrivileges($Identity, &quot;SeBatchLogonRight&quot;) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438<\/h3>\n<p>  \u0421 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u043f\u0440\u043e\u043a\u0441\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. <a href=\"https:\/\/winitpro.ru\/index.php\/2017\/04\/13\/powershell-cherez-proksi\/\" rel=\"nofollow\">\u0420\u0430\u0431\u043e\u0447\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/a> \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0448\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"powershell\">Function Set-Proxy {     &lt;#     .SYNOPSIS         \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u043a\u0441\u0438     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0434\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .EXAMPLE         #Set-Proxy a.cproxy.ru 8080     .PARAMETER Server         \u0410\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Port         \u041f\u043e\u0440\u0442 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;      [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Server,         [PARAMETER(Mandatory=$True)][Int]$Port         )  \tIf ((Test-NetConnection -ComputerName $Server -Port $Port).TcpTestSucceeded) { \t\tSet-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -name ProxyServer -Value &quot;$($Server):$($Port)&quot; \t\tSet-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -name ProxyEnable -Value 1 \t} Else { \t\tWrite-Error -Message &quot;-- Invalid proxy server address or port:  $($Server):$($Port)&quot; \t} } <\/code><\/pre>\n<h3>\u0417\u0430\u043f\u0440\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435 <\/h3>\n<p>  \u0421 \u0437\u0430\u043f\u0440\u0435\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0440\u0430\u0431\u0447\u0435\u043c \u0441\u0442\u043e\u043b\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441 \u0441\u0435\u0442\u044c\u044e. \u0412\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043f\u0430\u043f\u043a\u0443 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u0430\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u0432 *nix \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041d\u043e \u0438 \u0442\u0443\u0442 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u044b\u0440\u044b\u0435 \u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u0434 \u0441\u0435\u0431\u044f:  <\/p>\n<pre><code class=\"powershell\">Function Set-AccessRule {     &lt;#     .SYNOPSIS         \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u043a \u043d\u0430 \u043f\u0430\u043f\u043a\u0443     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0434\u0438\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e     .EXAMPLE         #Set-AccessRule -Folder $env:USERPROFILE\\Desktop\\  -UserName $env:USERNAME -Rules CreateFiles,AppendData -AccessControlType Deny     .PARAMETER Folder         \u0414\u0438\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER UserName         \u0418\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Rules         \u041f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u044f\u043f\u044f\u0442\u0443\u044e (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER AccessControlType         \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: Allow \u0438\u043b\u0438 Deny     #&gt;     [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][Path]$Folder,         [PARAMETER(Mandatory=$True)][String]$UserName,         [PARAMETER(Mandatory=$True)][String]$Rules,         [PARAMETER(Mandatory=$True)][String]$AccessControlType         )  \t#\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a ACL \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \t$acl = Get-Acl $Folder \t#\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044e \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \t$fileSystemRights = [System.Security.AccessControl.FileSystemRights]&quot;$Rules&quot; \t#C\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u0442\u0438\u043f\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \t$AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($UserName, $fileSystemRights, $AccessControlType) \t#\u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 \u043a\u043b\u0430\u0441\u0441 FileSystemAccessRule \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \t$acl.SetAccessRule($AccessRule) \t#\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a \u043f\u0430\u043f\u043a\u0435 \t$acl | Set-Acl $Folder }  Set-AccessRule -Folder $env:USERPROFILE\\Desktop\\  -UserName $env:USERNAME -Rules CreateFiles,AppendData,Delete -AccessControlType Deny <\/code><\/pre>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 FileSystemRights \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c <a href=\"https:\/\/docs.microsoft.com\/ru-ru\/dotnet\/api\/system.security.accesscontrol.filesystemrights?view=netframework-4.8\" rel=\"nofollow\">\u0441\u0430\u0439\u0442\u0435<\/a>. <\/p>\n<h3> \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <\/h3>\n<p>  \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u043b\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u0440\u0443\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043d\u0435\u043b\u044c, \u0441 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438. \u041e\u0442\u0432\u0435\u0442 \u043d\u0430\u0448\u0435\u043b\u0441\u044f <a href=\"http:\/\/gpo-planet.com\/?p=4203\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">PinnedApplication<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"powershell\">function Set-PinnedApplication {     &lt;#     .SYNOPSIS         \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044f\u0440\u043b\u044b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044f\u0440\u043b\u044b\u043a\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .EXAMPLE         #Set-PinnedApplication -Action UnpinfromTaskbar -FilePath &quot;$env:ProgramFiles\\Internet Explorer\\iexplore.exe&quot;     .EXAMPLE         #Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;${env:ProgramFiles(x86)}\\Mozilla Firefox\\firefox.exe&quot;     .PARAMETER Action         \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: UnpinfromTaskbar \u0438\u043b\u0438 PintoTaskbar     .PARAMETER FilePath         \u0418\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;    \t[CmdletBinding()]    \tparam(             [Parameter(Mandatory=$True)][String]$Action,              [Parameter(Mandatory=$True)][String]$FilePath    \t)    \tif(-not (test-path $FilePath)) {     \t\tthrow &quot;FilePath does not exist.&quot;   \t}    \tfunction InvokeVerb {    \t\tparam([string]$FilePath,$verb) \t\t$verb = $verb.Replace(&quot;&amp;&quot;,&quot;&quot;) \t\t$path = split-path $FilePath \t\t$shell = new-object -com &quot;Shell.Application&quot;  \t\t$folder = $shell.Namespace($path)    \t\t$item = $folder.Parsename((split-path $FilePath -leaf)) \t\t$itemVerb = $item.Verbs() | ? {$_.Name.Replace(&quot;&amp;&quot;,&quot;&quot;) -eq $verb} \t\tif($itemVerb -eq $null){ \t\t\tthrow &quot;Verb $verb not found.&quot;\t\t\t \t\t} else { \t\t\t$itemVerb.DoIt() \t\t}    \t} \tfunction GetVerb { \t\tparam([int]$verbId) \t\ttry { \t\t\t$t = [type]&quot;CosmosKey.Util.MuiHelper&quot; \t\t} catch { \t\t\t$def = [Text.StringBuilder]&quot;&quot; \t\t\t[void]$def.AppendLine('[DllImport(&quot;user32.dll&quot;)]') \t\t\t[void]$def.AppendLine('public static extern int LoadString(IntPtr h,uint id, System.Text.StringBuilder sb,int maxBuffer);') \t\t\t[void]$def.AppendLine('[DllImport(&quot;kernel32.dll&quot;)]') \t\t\t[void]$def.AppendLine('public static extern IntPtr LoadLibrary(string s);') \t\t\tAdd-Type -MemberDefinition $def.ToString() -name MuiHelper -namespace CosmosKey.Util\t\t\t \t\t} \t\tif($global:CosmosKey_Utils_MuiHelper_Shell32 -eq $null){\t\t \t\t\t$global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary(&quot;shell32.dll&quot;) \t\t} \t\t$maxVerbLength=255 \t\t$verbBuilder = New-Object Text.StringBuilder &quot;&quot;,$maxVerbLength \t\t[void][CosmosKey.Util.MuiHelper]::LoadString($CosmosKey_Utils_MuiHelper_Shell32,$verbId,$verbBuilder,$maxVerbLength) \t\treturn $verbBuilder.ToString() \t} \t$verbs = @{  \t\t&quot;PintoTaskbar&quot;=5386 \t\t&quot;UnpinfromTaskbar&quot;=5387 \t} \tif($verbs.$Action -eq $null){    \t\tThrow &quot;Action $action not supported`nSupported actions are:`n`tPintoTaskbar`n`tUnpinfromTaskbar&quot; \t} \tInvokeVerb -FilePath $FilePath -Verb $(GetVerb -VerbId $verbs.$action) } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c, \u0446\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430. \u0414\u043b\u044f \u043c\u0435\u043d\u044f, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Linux, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Windows \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u043d\u043e \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u0421\u043a\u0440\u0438\u043f\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u041f\u041e \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441\u0430.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430<\/h4>\n<p>  <\/p>\n<pre><code class=\"powershell\">Function New-User {     &lt;#     .SYNOPSIS         \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438     .EXAMPLE         #New-User &quot;Student&quot; &quot;Student&quot;     .PARAMETER Name         \u0418\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Password         \u041f\u0430\u0440\u043e\u043b\u044c (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;      [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Name,         [PARAMETER(Mandatory=$True)][String]$Password         )      $Pwd = convertto-securestring $Password -asplaintext -force     $GroupSID = &quot;S-1-5-32-545&quot;     New-LocalUser -User $Name -AccountNeverExpires:$true -FullName $Name -Password $Pwd -PasswordNeverExpires:$true     Add-LocalGroupMember -SID $GroupSID -Member $Name      Write-Host &quot;-- \u0421\u043e\u0437\u0434\u0430\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $Name \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c $Password&quot; -foregroundcolor Green }  Function Remove-Users {     &lt;#     .SYNOPSIS         \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b \u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438         \u0423\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u043e\u043b\u043e\u0433 \u0438 \u0440\u0435\u0435\u0441\u0442\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439     .EXAMPLE         #Remove-Users     #&gt;     [CmdletBinding()]      $UsersProfiles = Get-WMIObject -class Win32_UserProfile -ComputerName $env:COMPUTERNAME | Where {!($_.Loaded) -and !($_.Special)} \tforeach($Usr in $UsersProfiles) {         $UsrName = $Usr.LocalPath.Split(&quot;\\&quot;)[2]         Write-Host &quot;-- \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f $UsrName ...&quot; -foregroundcolor Green         Remove-LocalUser -Name $UsrName \t\tRemove-WmiObject -Path $Usr.__PATH         Write-Host &quot;-- \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $UsrName \u0443\u0434\u0430\u043b\u0435\u043d&quot; -foregroundcolor Green \t} }  Function Set-AutoLogon {     &lt;#     .SYNOPSIS         \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043b\u043a\u044e\u0447\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0432\u0445\u043e\u0434 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .EXAMPLE         #Set-AutoLogon  &quot;Student&quot; &quot;Student&quot;     .PARAMETER Name         \u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Password         \u041f\u0430\u0440\u043e\u043b\u044c (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;      [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Name,         [PARAMETER(Mandatory=$True)][String]$Password         )      $PathToWinlogon = &quot;HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&quot;     New-ItemProperty -Path $PathToWinlogon -Name AutoAdminLogon  -Value 1 -PropertyType &quot;String&quot;     New-ItemProperty -Path $PathToWinlogon -Name DefaultUserName -Value $Name -PropertyType &quot;String&quot;     New-ItemProperty -Path $PathToWinlogon -Name DefaultPassword -Value $Password -PropertyType &quot;String&quot; }  $Source = @' using System; using System.Collections.Generic; using System.Text;  namespace MyLsaWrapper {     using System.Runtime.InteropServices;     using System.Security;     using System.Management;     using System.Runtime.CompilerServices;     using System.ComponentModel;      using LSA_HANDLE = IntPtr;      [StructLayout(LayoutKind.Sequential)]     struct LSA_OBJECT_ATTRIBUTES     {         internal int Length;         internal IntPtr RootDirectory;         internal IntPtr ObjectName;         internal int Attributes;         internal IntPtr SecurityDescriptor;         internal IntPtr SecurityQualityOfService;     }     [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]     struct LSA_UNICODE_STRING     {         internal ushort Length;         internal ushort MaximumLength;         [MarshalAs(UnmanagedType.LPWStr)]         internal string Buffer;     }     sealed class Win32Sec     {         [DllImport(&quot;advapi32&quot;, CharSet = CharSet.Unicode, SetLastError = true),         SuppressUnmanagedCodeSecurityAttribute]         internal static extern uint LsaOpenPolicy(         LSA_UNICODE_STRING[] SystemName,         ref LSA_OBJECT_ATTRIBUTES ObjectAttributes,         int AccessMask,         out IntPtr PolicyHandle         );          [DllImport(&quot;advapi32&quot;, CharSet = CharSet.Unicode, SetLastError = true),         SuppressUnmanagedCodeSecurityAttribute]         internal static extern uint LsaAddAccountRights(         LSA_HANDLE PolicyHandle,         IntPtr pSID,         LSA_UNICODE_STRING[] UserRights,         int CountOfRights         );          [DllImport(&quot;advapi32&quot;, CharSet = CharSet.Unicode, SetLastError = true),         SuppressUnmanagedCodeSecurityAttribute]         internal static extern int LsaLookupNames2(         LSA_HANDLE PolicyHandle,         uint Flags,         uint Count,         LSA_UNICODE_STRING[] Names,         ref IntPtr ReferencedDomains,         ref IntPtr Sids         );          [DllImport(&quot;advapi32&quot;)]         internal static extern int LsaNtStatusToWinError(int NTSTATUS);          [DllImport(&quot;advapi32&quot;)]         internal static extern int LsaClose(IntPtr PolicyHandle);          [DllImport(&quot;advapi32&quot;)]         internal static extern int LsaFreeMemory(IntPtr Buffer);      }     \/\/\/ &lt;summary&gt;     \/\/\/ This class is used to grant &quot;Log on as a service&quot;, &quot;Log on as a batchjob&quot;, &quot;Log on localy&quot; etc.     \/\/\/ to a user.     \/\/\/ &lt;\/summary&gt;     public sealed class LsaWrapper : IDisposable     {         [StructLayout(LayoutKind.Sequential)]         struct LSA_TRUST_INFORMATION         {             internal LSA_UNICODE_STRING Name;             internal IntPtr Sid;         }         [StructLayout(LayoutKind.Sequential)]         struct LSA_TRANSLATED_SID2         {             internal SidNameUse Use;             internal IntPtr Sid;             internal int DomainIndex;             uint Flags;         }          [StructLayout(LayoutKind.Sequential)]         struct LSA_REFERENCED_DOMAIN_LIST         {             internal uint Entries;             internal LSA_TRUST_INFORMATION Domains;         }          enum SidNameUse : int         {             User = 1,             Group = 2,             Domain = 3,             Alias = 4,             KnownGroup = 5,             DeletedAccount = 6,             Invalid = 7,             Unknown = 8,             Computer = 9         }          enum Access : int         {             POLICY_READ = 0x20006,             POLICY_ALL_ACCESS = 0x00F0FFF,             POLICY_EXECUTE = 0X20801,             POLICY_WRITE = 0X207F8         }         const uint STATUS_ACCESS_DENIED = 0xc0000022;         const uint STATUS_INSUFFICIENT_RESOURCES = 0xc000009a;         const uint STATUS_NO_MEMORY = 0xc0000017;          IntPtr lsaHandle;          public LsaWrapper()             : this(null)         { }         \/\/ \/\/ local system if systemName is null         public LsaWrapper(string systemName)         {             LSA_OBJECT_ATTRIBUTES lsaAttr;             lsaAttr.RootDirectory = IntPtr.Zero;             lsaAttr.ObjectName = IntPtr.Zero;             lsaAttr.Attributes = 0;             lsaAttr.SecurityDescriptor = IntPtr.Zero;             lsaAttr.SecurityQualityOfService = IntPtr.Zero;             lsaAttr.Length = Marshal.SizeOf(typeof(LSA_OBJECT_ATTRIBUTES));             lsaHandle = IntPtr.Zero;             LSA_UNICODE_STRING[] system = null;             if (systemName != null)             {                 system = new LSA_UNICODE_STRING[1];                 system[0] = InitLsaString(systemName);             }              uint ret = Win32Sec.LsaOpenPolicy(system, ref lsaAttr,             (int)Access.POLICY_ALL_ACCESS, out lsaHandle);             if (ret == 0)                 return;             if (ret == STATUS_ACCESS_DENIED)             {                 throw new UnauthorizedAccessException();             }             if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))             {                 throw new OutOfMemoryException();             }             throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));         }          public void AddPrivileges(string account, string privilege)         {             IntPtr pSid = GetSIDInformation(account);             LSA_UNICODE_STRING[] privileges = new LSA_UNICODE_STRING[1];             privileges[0] = InitLsaString(privilege);             uint ret = Win32Sec.LsaAddAccountRights(lsaHandle, pSid, privileges, 1);             if (ret == 0)                 return;             if (ret == STATUS_ACCESS_DENIED)             {                 throw new UnauthorizedAccessException();             }             if ((ret == STATUS_INSUFFICIENT_RESOURCES) || (ret == STATUS_NO_MEMORY))             {                 throw new OutOfMemoryException();             }             throw new Win32Exception(Win32Sec.LsaNtStatusToWinError((int)ret));         }          public void Dispose()         {             if (lsaHandle != IntPtr.Zero)             {                 Win32Sec.LsaClose(lsaHandle);                 lsaHandle = IntPtr.Zero;             }             GC.SuppressFinalize(this);         }         ~LsaWrapper()         {             Dispose();         }         \/\/ helper functions          IntPtr GetSIDInformation(string account)         {             LSA_UNICODE_STRING[] names = new LSA_UNICODE_STRING[1];             LSA_TRANSLATED_SID2 lts;             IntPtr tsids = IntPtr.Zero;             IntPtr tdom = IntPtr.Zero;             names[0] = InitLsaString(account);             lts.Sid = IntPtr.Zero;             \/\/Console.WriteLine(&quot;String account: {0}&quot;, names[0].Length);             int ret = Win32Sec.LsaLookupNames2(lsaHandle, 0, 1, names, ref tdom, ref tsids);             if (ret != 0)                 throw new Win32Exception(Win32Sec.LsaNtStatusToWinError(ret));             lts = (LSA_TRANSLATED_SID2)Marshal.PtrToStructure(tsids,             typeof(LSA_TRANSLATED_SID2));             Win32Sec.LsaFreeMemory(tsids);             Win32Sec.LsaFreeMemory(tdom);             return lts.Sid;         }          static LSA_UNICODE_STRING InitLsaString(string s)         {             \/\/ Unicode strings max. 32KB             if (s.Length &gt; 0x7ffe)                 throw new ArgumentException(&quot;String too long&quot;);             LSA_UNICODE_STRING lus = new LSA_UNICODE_STRING();             lus.Buffer = s;             lus.Length = (ushort)(s.Length * sizeof(char));             lus.MaximumLength = (ushort)(lus.Length + sizeof(char));             return lus;         }     }     public class LsaWrapperCaller     {         public static void AddPrivileges(string account, string privilege)         {             using (LsaWrapper lsaWrapper = new LsaWrapper())             {                 lsaWrapper.AddPrivileges(account, privilege);             }         }     } } '@  Add-Type -TypeDefinition $Source | Out-Null   # ------------------------- # \u041f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f # ------------------------- $UserName    = &quot;Student&quot; $Password    = &quot;Student&quot;  Remove-Users | Out-Null New-User $UserName $Password | Out-Null Set-AutoLogon $UserName $Password | Out-Null [MyLsaWrapper.LsaWrapperCaller]::AddPrivileges($UserName, &quot;SeBatchLogonRight&quot;) | Out-Null write-host &quot;-- \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u0432\u0445\u043e\u0434 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f $UserName&quot; -foregroundcolor Green schtasks \/create \/tn LogonUserSettings \/tr &quot;pwsh C:\\Scripts\\SetupUser.ps1&quot; \/sc onlogon \/ru $env:USERDOMAIN\\$UserName \/rp $Password \/f <\/code><\/pre>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0439 \u0438\u0437 \u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Student<\/h4>\n<p>  <\/p>\n<pre><code class=\"powershell\">Function Set-Proxy {     &lt;#     .SYNOPSIS         \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u043a\u0441\u0438     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0434\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .EXAMPLE         #Set-Proxy a.cproxy.ru 8080     .PARAMETER Server         \u0410\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Port         \u041f\u043e\u0440\u0442 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;      [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Server,         [PARAMETER(Mandatory=$True)][Int]$Port         )  \tIf ((Test-NetConnection -ComputerName $Server -Port $Port).TcpTestSucceeded) { \t\tSet-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -name ProxyServer -Value &quot;$($Server):$($Port)&quot; \t\tSet-ItemProperty -Path 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings' -name ProxyEnable -Value 1 \t} Else { \t\tWrite-Error -Message &quot;-- Invalid proxy server address or port:  $($Server):$($Port)&quot; \t} }  Function Set-AccessRule {     &lt;#     .SYNOPSIS         \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0430\u0432\u043a \u043d\u0430 \u043f\u0430\u043f\u043a\u0443     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0434\u0438\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e     .EXAMPLE         #Set-AccessRule -Folder $env:USERPROFILE\\Desktop\\  -UserName $env:USERNAME -Rules CreateFiles,AppendData -AccessControlType Deny     .PARAMETER Folder         \u0414\u0438\u0440\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER UserName         \u0418\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER Rules         \u041f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e(\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     .PARAMETER AccessControlType         \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: Allow \u0438\u043b\u0438 Deny     #&gt;     [CmdletBinding()]     param (         [PARAMETER(Mandatory=$True)][String]$Folder,         [PARAMETER(Mandatory=$True)][String]$UserName,         [PARAMETER(Mandatory=$True)][String]$Rules,         [PARAMETER(Mandatory=$True)][String]$AccessControlType         )      #\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a ACL \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430     $acl = Get-Acl $Folder     #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044e \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438     $fileSystemRights = [System.Security.AccessControl.FileSystemRights]&quot;$Rules&quot;     #C\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u0442\u0438\u043f\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f     $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($UserName, $fileSystemRights, $AccessControlType)     #\u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 \u043a\u043b\u0430\u0441\u0441 FileSystemAccessRule \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430     $acl.SetAccessRule($AccessRule)     #\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a \u043f\u0430\u043f\u043a\u0435     $acl | Set-Acl $Folder }  function Set-PinnedApplication {     &lt;#     .SYNOPSIS         \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044f\u0440\u043b\u044b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f     .DESCRIPTION         \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044f\u0440\u043b\u044b\u043a\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     .EXAMPLE         #Set-PinnedApplication -Action UnpinfromTaskbar -FilePath &quot;$env:ProgramFiles\\Internet Explorer\\iexplore.exe&quot;     .EXAMPLE         #Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;${env:ProgramFiles(x86)}\\Mozilla Firefox\\firefox.exe&quot;     .PARAMETER Action         \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: UnpinfromTaskbar \u0438\u043b\u0438 PintoTaskbar     .PARAMETER FilePath         \u0418\u043c\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440)     #&gt;     [CmdletBinding()]     param(             [Parameter(Mandatory=$True)][String]$Action,              [Parameter(Mandatory=$True)][String]$FilePath     )     if(-not (test-path $FilePath)) {          throw &quot;FilePath does not exist.&quot;       }     function InvokeVerb {         param([string]$FilePath,$verb)         $verb = $verb.Replace(&quot;&amp;&quot;,&quot;&quot;)         $path = split-path $FilePath         $shell = new-object -com &quot;Shell.Application&quot;          $folder = $shell.Namespace($path)            $item = $folder.Parsename((split-path $FilePath -leaf))         $itemVerb = $item.Verbs() | ? {$_.Name.Replace(&quot;&amp;&quot;,&quot;&quot;) -eq $verb}         if($itemVerb -eq $null){             throw &quot;Verb $verb not found.&quot;                    } else {             $itemVerb.DoIt()         }     }     function GetVerb {         param([int]$verbId)         try {             $t = [type]&quot;CosmosKey.Util.MuiHelper&quot;         } catch {             $def = [Text.StringBuilder]&quot;&quot;             [void]$def.AppendLine('[DllImport(&quot;user32.dll&quot;)]')             [void]$def.AppendLine('public static extern int LoadString(IntPtr h,uint id, System.Text.StringBuilder sb,int maxBuffer);')             [void]$def.AppendLine('[DllImport(&quot;kernel32.dll&quot;)]')             [void]$def.AppendLine('public static extern IntPtr LoadLibrary(string s);')             Add-Type -MemberDefinition $def.ToString() -name MuiHelper -namespace CosmosKey.Util                     }         if($global:CosmosKey_Utils_MuiHelper_Shell32 -eq $null){                     $global:CosmosKey_Utils_MuiHelper_Shell32 = [CosmosKey.Util.MuiHelper]::LoadLibrary(&quot;shell32.dll&quot;)         }         $maxVerbLength=255         $verbBuilder = New-Object Text.StringBuilder &quot;&quot;,$maxVerbLength         [void][CosmosKey.Util.MuiHelper]::LoadString($CosmosKey_Utils_MuiHelper_Shell32,$verbId,$verbBuilder,$maxVerbLength)         return $verbBuilder.ToString()     }     $verbs = @{          &quot;PintoTaskbar&quot;=5386         &quot;UnpinfromTaskbar&quot;=5387     }     if($verbs.$Action -eq $null){         Throw &quot;Action $action not supported`nSupported actions are:`n`tPintoTaskbar`n`tUnpinfromTaskbar&quot;     }     InvokeVerb -FilePath $FilePath -Verb $(GetVerb -VerbId $verbs.$action) }  Set-Proxy cproxy.udsu.ru 8080 Set-AccessRule -Folder $env:USERPROFILE\\Desktop\\  -UserName $env:USERNAME -Rules &quot;CreateFiles,AppendData,Delete&quot; -AccessControlType Deny  Set-PinnedApplication -Action UnpinfromTaskbar -FilePath &quot;$env:ProgramFiles\\Internet Explorer\\iexplore.exe&quot; Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;${env:ProgramFiles(x86)}\\Mozilla Firefox\\firefox.exe&quot; Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Office 2013\\Excel 2013.lnk&quot; Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Office 2013\\Word 2013.lnk&quot; Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Office 2013\\PowerPoint 2013.lnk&quot; Set-PinnedApplication -Action PintoTaskbar -FilePath &quot;$env:ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\\u0410\u0421\u041a\u041e\u041d\\\u041a\u041e\u041c\u041f\u0410\u0421-3D V16\\\u041a\u041e\u041c\u041f\u0410\u0421-3D V16.lnk&quot;  # \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043e\u0441\u043b\u0435 \u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Unregister-ScheduledTask -TaskName UdSUSettingStudent -Confirm:$false <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<\/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\/post\/514590\/\"> https:\/\/habr.com\/ru\/post\/514590\/<\/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\/post\/514590\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_m\/ku\/5h\/_mku5hwc7tbnyldc8rnbcbexlau.png\"><\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 10 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u041e\u0421 Microsoft Windows 8.1. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0443\u0447\u0435\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u041f\u041e \u0438 \u043e\u0431\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0438 \u043e\u0431\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0435\u0441\u0442\u044c 2 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0438 \u0421\u0442\u0443\u0434\u0435\u043d\u0442. \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e\u043b\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0443 \u0421\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u041f\u041e. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0442\u0440\u0443\u0436\u0434\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0447\u0438\u0441\u0442\u043a\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0421\u0442\u0443\u0434\u0435\u043d\u0442, \u044d\u0442\u0430 \u0443\u0447\u0435\u0442\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e. \u042d\u0442\u043e \u0432\u043b\u0435\u0447\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0433\u043e\u0434\u0443 \u0440\u0435\u0448\u0438\u043b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 c \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0431\u0435\u0437 ActiveDirectory \u0438 \u0441\u043e\u0431\u0440\u0430\u043b \u0432 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u044b\u0441\u043a\u0430\u043b \u0432 \u0441\u0435\u0442\u0438.  <\/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-308243","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308243","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=308243"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308243\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}