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.
The command can not execute on Windows7.
https://technet.microsoft.com/en-us//library/jj649808(v=wps.630).aspx
User contributions licensed under CC BY-SA 3.0