3
votes

On one of our Windows Server 2012 R2 machine, I can't run Get-ScheduledTask as an Administrator. I can run it as normal user. Following is the error message, I receive when I try to execute the command, if I run PowerShell as an Admin.

Get-ScheduledTask : The parameter is incorrect.
At line:1 char:1
+ Get-ScheduledTask
    + CategoryInfo          : InvalidArgument: (MSFT_ScheduledTask:Root/Microsoft/...T_ScheduledTask) [Get-ScheduledTask], CimException
    + FullyQualifiedErrorId : HRESULT 0x80070057,Get-ScheduledTask

Can someone please advise, why is it so?

1
Can you show the full command you're running ? coz the error message states a parameter is incorrect, means you are passing something else with the Get-SheduledTask - HariHaran
Thats the full command mate. Even I am confused with the error message. I am not passing any argument at all - Ravi
Ok i just checked this social.technet.microsoft.com/Forums/ie/en-US/… and it seems to be a framework issue, can you try running the command after a system restart - HariHaran
Thanks mate. Restart fixed this issue. :) (Should have thought about it before) - Ravi
Can you please post it as an answer, so that you can get some points. :) - Ravi

1 Answers

1
votes

Seems to be a transient framework issue. Restart the machine should fix it . Reference