Forum Discussion
How to disable/stop a task using Powershell CLI
Hi all,
When I run "Get-ScheduledTask" command, I found my PC is running this task "Google Pinyin Daemon Running", I tried to stop it but failed, then I tried to disable it but still failed. Can someone suggest how to achieve my purpose? Thank you.
Task list:
C:\Users\> Get-ScheduledTask
TaskPath TaskName State
-------- -------- -----
\ Adobe Acrobat Update Task Ready
\ Adobe Flash Player NPAPI Notifier Ready
\ AdobeGCInvoker-1.0 Ready
\ Google Pinyin Daemon Running
\ McAfeeLogon Ready
\ OneDrive Standalone Update Tas... Ready
PS C:\Users\> Set-Service -Name "Google Pinyin Daemon" -Status stopped
Set-Service : Service Google Pinyin Daemon was not found on computer '.'.
At line:1 char:1
+ Set-Service -Name "Google Pinyin Daemon" -Status stopped
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.:String) [Set-Service], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.SetServiceCommand
PS C:\Users\iMac> Set-Service -Name "Google Pinyin Daemon" -Status stopped -StartupType disabled
Set-Service : Service Google Pinyin Daemon was not found on computer '.'.
At line:1 char:1
+ Set-Service -Name "Google Pinyin Daemon" -Status stopped -StartupTyp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.:String) [Set-Service], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.SetServiceCommand
Hi,
What I actually want is check it from the GUI
Check the Action, is the destination file really exist or what, does the schedule start a service or start an executable.
if the schedule task starting an executable, it doesnt mean that it should be assigned to a service.
- farismalaebSteel Contributor
Did you open the services and confirm that the service is really there, as it seems from the error from Powershell, the service does not exist or it has a different name.
try the following:
open the schedule task GUI and check the Action, and see what exactly this task is doing, maybe its starting an app, not a service.
Kill the app.
- wordsbaoCopper ContributorThank you farismalaeb . I opened it but don't see the service there. ANd I think I have deleted Google Pinyin from my computer long time ago.
- farismalaebSteel ContributorCan u post a screenshot of the schedule task