Posted On June 23, 2020

PowerShell: Disable Annoying Windows Updates Notifications

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell: Disable Annoying Windows Updates Notifications

This little snippet would render these notices as void.

# This snippet is to add the deny execute permissions to the pop-up executables
# Windows Updates wuapp.exe (GUI) & PSWindowsUpdate (PS Module) are unaffected. To reverse, simply remove the added ACL

$system32="$env:windir\System32"
$annoyingNotifications="$system32\musnotification.exe","$system32\musnotificationux.exe"
$denyExecute= New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone","Execute","Deny")
$annoyingNotifications|%{
    takeown /f $_;
if (test-path $_){    
$acl = Get-ACL $_    
    $acl.AddAccessRule($denyExecute)
    Set-Acl $_ $acl
}
    }
# Legacy method: start an elevated command prompt and enter these commands:

cmd.exe
cd /d "%windir%\System32"
takeown /f musnotification.exe
icacls musnotification.exe /deny Everyone:(X)
takeown /f musnotificationux.exe
icacls musnotificationux.exe /deny Everyone:(X)
# This snippet to reverse the effects of the previous function

cd /d "%Windir%\System32"
icacls musnotification.exe /remove:d Everyone
icacls musnotification.exe /grant Everyone:F
icacls musnotification.exe /setowner "NT SERVICE\TrustedInstaller"
icacls musnotification.exe /remove:g Everyone
icacls musnotificationux.exe /remove:d Everyone
icacls musnotificationux.exe /grant Everyone:F
icacls musnotificationux.exe /setowner "NT SERVICE\TrustedInstaller"
icacls musnotificationux.exe /remove:g Everyone

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: WinHTTP Proxy

The most direct method to set WinHTTP proxy settings on a Windows machine is to…

Basic CSS: Adjust the Padding of an Element

<style>.injected-text {margin-bottom: -25px;text-align: center;}.box {border-style: solid;border-color: black;border-width: 5px;text-align: center;}.yellow-box {background-color: yellow;padding: 10px;}.red-box {background-color: crimson;color: #fff;padding:…

Basic JavaScript: Comparison with the Strict Inequality Operator

function testStrictNotEqual(val) {// Only Change Code Below this Line// Add the strict inequality operator to…
Other project: DragonCoin.com