disable a task in task scheduler using powershell

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • if task is in a folder
    Disable-ScheduledTask -TaskPath "folder location" -TaskName "task name"
    eg:
    Disable-ScheduledTask -TaskPath "\Microsoft\Windows\UpdateOrchestrator\" -TaskName "Report policies"
    or
    if task not in folder
    Disable-ScheduledTask -TaskName "task name"
    for access denied
    optional:
    type Set-ExecutionPolicy Unrestricted in powershell
    if not work then take ownership in
    C:\Windows\System32\Tasks
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\

Комментарии •