How can I troubleshoot Scheduled Task error 2147942401 when running PowerShell?
I created a Windows Scheduled Task to run a PowerShell script, but it fails with error 2147942401 (0x80070001, ERROR_INCORRECT_FUNCTION). The task uses C:WindowsSystem32WindowsPowerShellv1.0powershell.exe with these arguments: -ExecutionPolicy Bypass…