From bdbd9fc0a6fcb9fdb938bb19edc4e4eb87e8b34f Mon Sep 17 00:00:00 2001 From: farag2 Date: Wed, 3 Apr 2019 15:18:47 +0300 Subject: [PATCH] Update Win 10.ps1 --- Win 10.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Win 10.ps1 b/Win 10.ps1 index b3f0e7b5..0757446d 100644 --- a/Win 10.ps1 +++ b/Win 10.ps1 @@ -555,10 +555,11 @@ New-ItemProperty -Path "Registry::HKEY_USERS\.DEFAULT\Control Panel\Keyboard" -N $drives = Get-Disk | Where-Object {$_.IsBoot -eq $false} IF ($drives) { - $drives = ($drives | Get-Partition | Get-Volume | Where-Object {$null -ne $_.DriveLetter}).DriveLetter + ':' - Foreach ($drive In $drives) + $drives = ($drives | Get-Partition | Get-Volume | Where-Object {$null -ne $_.DriveLetter}).DriveLetter | ForEach-Object {Join-Path ($_ + ":") $Path -Resolve} + Foreach ($drive in $drives) { - Set-MpPreference -ExclusionPath $drive\Программы\Прочее -Force + $folder = "Программы\Прочее" + Add-MpPreference -ExclusionPath (Join-Path -Path $drive -ChildPath $folder) -Force } } # Включить Защиты сети в Защитнике Windows