Defender Update Signatures at Windows launch Hidden


  1. Posts : 12
    Windows 10
       #1

    Defender Update Signatures at Windows launch Hidden


    Hi all!

    Before Creator's Update (1709) i had a simple command line to update Defender signatures at boot
    with task scheduler. And that was an all hidden task.
    The reason for this is because I've set Windows into notification mode for updates, and it's
    annoying to be notified of Defender signatures shortly after launch.
    However, that old command line no longer works with Creator's Update, and i had a hard time
    finding a solution without the ugly cmd window pop up.
    But here's a trick to execute powershell.exe in a hidden state, hence it's a clean background task.
    How:
    Create a folder named scripts under the C: drive, (C:\Scripts)
    Inside that folder create a textfile and name it Defender.ps1
    Input only this one-liner into that textfile and save:
    Code:
    Update-MpSignature
    Inside the same folder create another textfile and name it Defender.js
    Input this into that textfile and save:
    Code:
    var wshShell = new ActiveXObject("WScript.Shell");
    wshShell.Run('%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Bypass -File "C:\\Scripts\\Defender.ps1"', 0, false);
    Now create a task in task scheduler with these settings:
    Trigger: At logon
    Action Start a program, Program/scipt: wscript
    Arguments: "C:\Scripts\Defender.js"

    The reason this works is because wscript is not a console program.
    Voilą done!
      My Computer


  2. Posts : 42,992
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Thanks- looks really handy- I've been annoyed by exactly that but not got around to thinking how to deal with it.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:27.
Find Us




Windows 10 Forums