Batch file is not stopping a windows server

Batch file is not stopping windows service even if I run it as an administrator. I need this service to start and stop on a schedule.

Tried without and without quotes.
NET STOP "Cloud Station Backup VSS Service x64"

I tried from a command prompt as administrator and was able to start and stop it.
cnl83Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jose Gabriel Ortega CastroCEOCommented:
open powershell console and run:
get-service "Cloud Station Backup VSS Service x64" | select Name,DisplayName and post the result

Open in new window



What if you use powershell?
To stop: Stop-Service  "Cloud Station Backup VSS Service x64"
To Start:  Start-Service "Cloud Station Backup VSS Service x64"

On script:
$status = Get-Service "Cloud Station Backup VSS Service x64" | select -ExpandProperty  status
if($Status -eq "Stopped"){ #if stopped start it
    Start-Service "Cloud Station Backup VSS Service x64"
}

if($Status -eq "Running"){ #if Running, stop it
    Stop-Service "Cloud Station Backup VSS Service x64"
}

Open in new window

0
cnl83Author Commented:
I can't use powershell because some of these computers will not have powershell.
0
McKnifeCommented:
The batch file needs to be run elevated, that's all. Right click it and select "run as administrator".
2

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Jose Gabriel Ortega CastroCEOCommented:
Yes as McKnife says, you have a checkbox in the Task Scheduler that is "Run with the highest privileges" that one needs to be checked.

PS Powershell is there since windows 7. (version 2.0).
0
cnl83Author Commented:
Yes, elevated mode worked. Thanks!
0
Jose Gabriel Ortega CastroCEOCommented:
Yes, to stop or start services you need that level of privileges.
0
McKnifeCommented:
Anything still unclear? If not, please close the question now.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.