From de9563f5b13ecad88f309f6ba6fb496d94ceada4 Mon Sep 17 00:00:00 2001 From: farag2 Date: Mon, 2 Sep 2019 10:11:08 +0300 Subject: [PATCH] 02.09.2019 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed Get-ResolvedPath function from script due to lack of need; Fixed typo in "Show Task Manager details" section. Удалена функция Get-ResolvedPath из-за отсутствия необходимости; Исправлена опечатка в разделе "Show Task Manager details". --- Win 10.ps1 | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Win 10.ps1 b/Win 10.ps1 index 20d163d7..9660401d 100644 --- a/Win 10.ps1 +++ b/Win 10.ps1 @@ -790,19 +790,6 @@ Do } } Until ($paths -match "`"") -function Get-ResolvedPath -{ - param ( - [Parameter(ValueFromPipeline = 1)] - $Path - ) - (Get-Disk | Where-Object -FilterScript {$_.IsBoot -eq $false} | Get-Partition | Get-Volume | Where-Object -FilterScript {$null -ne $_.DriveLetter}).DriveLetter | ForEach-Object -Process {Join-Path ($_ + ":") $Path -Resolve -ErrorAction SilentlyContinue} -} -$folder = "Программы\Прочее" | Get-ResolvedPath -IF ($folder) -{ - Add-MpPreference -ExclusionPath $folder -Force -} # Turn on Windows Defender Exploit Guard Network Protection # Включить Защиту сети в Защитнике Windows Set-MpPreference -EnableNetworkProtection Enabled @@ -887,7 +874,7 @@ Do $preferences = Get-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager -Name Preferences -ErrorAction SilentlyContinue } Until ($preferences) -Stop-Process -Name $taskmgr +Stop-Process -Name Taskmgr $preferences.Preferences[28] = 0 New-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager -Name Preferences -PropertyType Binary -Value $preferences.Preferences -Force # Do not allow the computer to turn off the device to save power for desktop