'How can I `Enable All Tasks History` in PowerShell?

In the task scheduler GUI it is easy to Enable All Tasks History

See also https://stackoverflow.com/questions/11013132/how-can-i-enable-the-windows-server-task-scheduler-history-recording

Enable All Tasks History button in GUI

How can I Enable All Tasks History through PowerShell?

I have looked at Set-ScheduledTask and New-ScheduledTask, but nothing useful there (as far as I can see).



Solution 1:[1]

From an elevated command prompt or PowerShell

wevtutil set-log Microsoft-Windows-TaskScheduler/Operational /enabled:true

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Koder101