Files
dedinit.ru/content/posts/20171104 - otklyuchit-poisk-windows/index.md
T
2026-10-04 19:01:00 +00:00

56 lines
1.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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"
---
![](img-1.png)
Еще одна бесполезная для меня часть используемой мной 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"
}