I want to use a powershell script to turn off windows update service & auto updates windows 10 using powershell. I\'ve searched around but the commands didn\'t turn eit
EDIT 2020-07-30:
The former solution, which is bellow, works only partially: it does not disable the WindowsUpdate/sihpostreboot service, because Microsoft is fighting against guides like this.
WHAT WORKS FULLY: (how to disable the rest)
THE ORIGINAL ANSWER:
This script is based on Kemal's answer.
The improvement is that it disables also tasks in WindowsUpdate and UpdateOrchestrator folders that cannot be disabled manually in Task Scheduler. Furthermore, it disables the Windows Update service.
Recommended execution:
Clear-Host $WindowsUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\" $AutoUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" If(Test-Path -Path $WindowsUpdatePath) { Remove-Item -Path $WindowsUpdatePath -Recurse } New-Item $WindowsUpdatePath -Force New-Item $AutoUpdatePath -Force Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 1 Get-ScheduledTask -TaskPath "\Microsoft\Windows\WindowsUpdate\" | Disable-ScheduledTask takeown /F C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator /A /R icacls C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator /grant Administrators:F /T Get-ScheduledTask -TaskPath "\Microsoft\Windows\UpdateOrchestrator\" | Disable-ScheduledTask Stop-Service wuauserv Set-Service wuauserv -StartupType Disabled # We disable WindowsUpdate folder again, because wuauserv service could have enabled it meanwhile Get-ScheduledTask -TaskPath "\Microsoft\Windows\WindowsUpdate\" | Disable-ScheduledTask Write-Output "All Windows Updates were disabled"
Note: the script may display execution errors if WindowsUpdate folder or UpdateOrchestrator folder does not exist.
Note 2: you may need to run the script again after some Microsoft installer runs (like .Net Framework installer, Visual Studio installer, ...), because they enable updates again.
For disable auto update of Windows 10 Run --> services.msc --> Windows Update --> properties --> Startup type --> Disabled
http://optimistpower.blogspot.in/2017/12/how-to-disable-windows-auto-update-in.html
There is much easier way to get rid all network hog application's nasty activities at once : Using local machine's sock proxy.
Most of windows applications now-day built-in their own cloud. They all go their own server when you start windows. It is not easy to block them one by one manually.
So I come up this way, block them all at once, and I only allow certain apps to go internet whenever I need.
Strategy : Block the Windows box internet access, then use SSH dynamic port forward to establish a tunnel, forwards all internet requests to a Linux SSH server on local network. Since I do not give the internet proxy setting in system level, Windows box like a little ant has no way to find its giant queen on Microsoft, cause it is blocked.
Step 1 : block all internet accessing for a windows box. Many way to implemented this: I modify the router to block the Windows box to access internet.
Step 2 : Install ssh client on your windows box. I installed open-ssh client in my windows box. You need a Linux box to have ssh server running in same network. I use synology diskstaion NAS system. It runs all day, so all my local network use it as proxy server. You can also simply install a vertual linux box in your windows box, use it for many things.
Step 3: Open a local port and tunnel all traffics sent to it linux box. We use port 1080. Execute ssh command:
ssh -D 1080 <ssh-username>@<linuxbox_address>
There are much more things you can do to simplify the ssh login, such as use ssh key etc.
Step 4: Now your windows box's port 1080 is opened to internet, through the linux box. You just need tell each app how to use this port. For example, you want Chrome browser in your windows box to surf internet, no problem. change the chrome startup command line option (right click the chrome icon, change the command line, make it looks like this :
.../chrome.exe --proxy-server=SOCKS4://127.0.0.1:1080
You are good to go. Note : do not change system's internet proxy setting. cause the system proxy setting is shared by all programs. You do not want all apps can access internet. That is the reason we walk all the way here.
Now I feel like the Windows box is usable again.
I found this information you can try it
Powershell
Clear-Host
Write-Host "0 -> Change setting in Windows Update app (default)"
Write-Host "1 -> Never check for updates (not recommended)"
Write-Host "2 -> Notify for download and notify for install"
Write-Host "3 -> Auto download and notify for install"
Write-Host "4 -> Auto download and schedule the install"
Write-Host "Enter any character to exit"
Write-Host
switch(Read-Host "Choose Window Update Settings"){
0 {$UpdateValue = 0}
1 {$UpdateValue = 1}
2 {$UpdateValue = 2}
3 {$UpdateValue = 3}
4 {$UpdateValue = 4}
Default{Exit}
}
$WindowsUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\"
$AutoUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
If(Test-Path -Path $WindowsUpdatePath) {
Remove-Item -Path $WindowsUpdatePath -Recurse
}
If ($UpdateValue -gt 0) {
New-Item -Path $WindowsUpdatePath
New-Item -Path $AutoUpdatePath
}
If ($UpdateValue -eq 1) {
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 1
}
If ($UpdateValue -eq 2) {
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 0
Set-ItemProperty -Path $AutoUpdatePath -Name AUOptions -Value 2
Set-ItemProperty -Path $AutoUpdatePath -Name ScheduledInstallDay -Value 0
Set-ItemProperty -Path $AutoUpdatePath -Name ScheduledInstallTime -Value 3
}
If ($UpdateValue -eq 3) {
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 0
Set-ItemProperty -Path $AutoUpdatePath -Name AUOptions -Value 3
Set-ItemProperty -Path $AutoUpdatePath -Name ScheduledInstallDay -Value 0
Set-ItemProperty -Path $AutoUpdatePath -Name ScheduledInstallTime -Value 3
}
If ($UpdateValue -eq 4) {
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 0
Set-ItemProperty -Path $AutoUpdatePath -Name AUOptions -Value 4
Set-ItemProperty -Path $AutoUpdatePath -Name ScheduledInstallDay -Value 0
Set-ItemProperty -Path $AutoUpdatePath -Name ScheduledInstallTime -Value 3
}
If anyone stumbles upon this question simply trying to temporarily disable updates in Windows 10, look for the setting: "Set as metered connection" and turn it on. I know this doesn't address the OP's question but this question comes up as one of the first hits when searching for how to turn off updates.
There are several methods to stop windows update.
As central as it is to the core of Windows 10, Windows Update is actually just another Windows process so it can be stopped with these simple steps:
Here attached image how this done.