Get-ScheduledTask error on local environment with PSVersion 4.0

0

I can not execute Get-ScheduledTask command by local environment.
However I can execute it to remote servers from local environment.

Command(to remote servers)

> $c = New-CimSession -ComputerName "host name" -Credential xxx.xxx.xxx.xxx
> Get-ScheduledTask -CimSession $c -TaskName "taskname"

Command(to local)

> Get-ScheduledTask 

Error

+ Get-ScheduledTask
+ ~~~~~~~~~~~~~~~~~
  + CategoryInfo          : MetadataError: (MSFT_ScheduledTask:Root/Microsoft/...T_ScheduledTask) [Get-ScheduledTask], CimException
  + FullyQualifiedErrorId : HRESULT 0x8004100e,Get-ScheduledTask

Questions
1) What is the cause of this error?
2) Why I can execute the command remotely?

Please let me know if you need more information to solve this issue.
Thank you.

powershell
windows-7
asked on Stack Overflow May 16, 2017 by tekun • edited May 16, 2017 by tekun

1 Answer

0

The command can not execute on Windows7.

https://technet.microsoft.com/en-us//library/jj649808(v=wps.630).aspx

answered on Stack Overflow May 18, 2017 by tekun

User contributions licensed under CC BY-SA 3.0