56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
---
|
||
date: '2017-11-04T16:32:00+03:00'
|
||
lastmod: '2017-11-04T16:32:00+03:00'
|
||
draft: true
|
||
title: 'Отключить Поиск Windows'
|
||
slug: 'otklyuchit-poisk-windows'
|
||
|
||
categories:
|
||
- 'powershell'
|
||
|
||
tags:
|
||
- 'windows'
|
||
|
||
cover:
|
||
image: "hero.svg"
|
||
alt: "Отключить Поиск Windows"
|
||
---
|
||
|
||

|
||
|
||
Еще одна бесполезная для меня часть используемой мной Windows 10 - это поиск. Сервис который бесполезно тратить оперативную память и процессорное время. Не так много, но курочка по зёрнышку...
|
||
|
||
Как всегда оформлю всё в виде Powershell скрипта, чтобы не возиться с GUI утилитами.
|
||
|
||
$RegPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
|
||
|
||
$RegPathShort = "HKLM:\SOFTWARE\Policies\Microsoft\Windows"
|
||
|
||
$RegProperty = "AllowCortana"
|
||
|
||
if (test-path $RegPath) {
|
||
|
||
$y = Get-ItemPropertyValue -path $RegPath -Name $RegProperty -ErrorVariable x -ErrorAction SilentlyContinue
|
||
|
||
if ($y) {
|
||
|
||
Set-ItemProperty -path $RegPath -Name $RegProperty -value "0"
|
||
|
||
}
|
||
|
||
else {
|
||
|
||
New-ItemProperty -path $RegPath -Name $RegProperty -Value "0" -PropertyType "Dword"
|
||
|
||
}
|
||
|
||
}
|
||
|
||
else {
|
||
|
||
mkdir -path $RegPathShort -name "Windows Search"
|
||
|
||
New-ItemProperty -path $RegPath -Name $RegProperty -Value "0" -PropertyType "Dword"
|
||
|
||
}
|