Browse Source

02.09.2019

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".
pull/17/head 4.0.3
farag2 5 years ago
committed by GitHub
parent
commit
de9563f5b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      Win 10.ps1

15
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

Loading…
Cancel
Save