Created
March 9, 2022 08:54
-
-
Save b4tman/8ec5e6ea537a7afdb96d2e696cf312ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stop-Service wuauserv | |
Set-Service -Name wuauserv -StartupType disabled | |
$NewAcl = Get-Acl -Path "C:\WINDOWS\system32\wuaueng.dll" | |
Set properties | |
#$identity = "BUILTIN\Administrators" | |
$identity = "Администраторы" | |
$fileSystemRights = "FullControl" | |
$type = "Allow" | |
$fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type | |
$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList | |
$NewAcl.SetAccessRule($fileSystemAccessRule) | |
Set-Acl -Path "C:\WINDOWS\system32\wuaueng.dll" -AclObject $NewAcl | |
Rename-Item -Path "C:\WINDOWS\system32\wuaueng.dll" -NewName "wuaueng_old.dll" | |
New-Item -Path "C:\WINDOWS\system32\" -Name "wuaueng.dll" -ItemType "file" -Value "Заглушка" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment