June 22, 2010 at 12:24 pm
I am not able to stop sql service at my local system because this says that there is some dependent service.
PS C:\Windows\system32> Get-Service | Where-Object {$_.name -eq "mssqlserver"} | Where-Object {$_.status -eq "Running"}
| Stop-Service
Stop-Service : Cannot stop service 'SQL Server (MSSQLSERVER) (MSSQLSERVER)' because it has dependent services. It can o
nly be stopped if the Force flag is set.
At line:1 char:111
+ Get-Service | Where-Object {$_.name -eq "mssqlserver"} | Where-Object {$_.status -eq "Running"} | Stop-Service <<<<
+ CategoryInfo : InvalidOperation: (System.ServiceProcess.ServiceController:ServiceController) [Stop-Serv
ice], ServiceCommandException
+ FullyQualifiedErrorId : ServiceHasDependentServices,Microsoft.PowerShell.Commands.StopServiceCommand
The dependent service is System.ServiceProcess.ServiceController[]. I searched for this dependent service in services.msc (or
GET-SERVICE) but could not find any service with this name. what to do? Need help...
June 27, 2010 at 6:38 pm
Try this:
Get-Service | Where-Object {$_.name -eq "mssqlserver"} | Where-Object {$_.status -eq "Running"} | Stop-Service -force
Joie Andrew
"Since 1982"
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply