SOLVED

How to disable/stop a task using Powershell CLI

New Contributor

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

 

 

 

7 Replies

@wordsbao 

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.

 

Thank 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.
Can u post a screenshot of the schedule task

Hi @farismalaeb 

 

Sorry for the delay, preparing for my RHCSA but still failed.

 

Capture.PNG 

best response confirmed by wordsbao (New Contributor)
Solution

@wordsbao 

Hi, 

What I actually want is check it from the GUI

1.png

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.

 

Thank you, @farismalaeb , I fount it there and deleted it. Appreciate all your help!

 

 

 

 

Thanks for the update
Glad ur problem is solved
Would u please click on Best Response
Thanks