troubleshooting Question

Unable to stop, start or get a Service using PowerShell

Avatar of wally_davis
wally_davisFlag for United States of America asked on
Windows 7
2 Comments1 Solution2477 ViewsLast Modified:
This has been very frustrating and am trying to figure out the root cause.
I'm running PowerShell on Windows 7 Ultimate and not matter what I type, I'm getting all kinds of errors regardless of whether I choose "Get-Service MSSQL$SQLEXPRESS", "Stop-Service MSSQL$SQLEXPRESS" or ""Start-Service MSSQL$SQLEXPRESS" within the PS Shell.
I'm not sure if it has anything to do with my PowerShell profile or what. I'm completely new to using PowerShell and have just started to dive in. Like it so far but, for crying out loud, these commands should work and they're not.
Thanks for any insight you can provide Experts.
Wally
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
 
PS C:\Windows\system32> Get-Service MSSQL$SQLEXPRESS
Get-Service : Cannot find any service with service name 'MSSQL'.
At line:1 char:12
+ Get-Service <<<<  MSSQL$SQLEXPRESS
    + CategoryInfo          : ObjectNotFound: (MSSQL:String) [Get-Service], ServiceCommandException
    + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetServiceCommand
 
PS C:\Windows\system32> Stop-Service
 
cmdlet Stop-Service at command pipeline position 1
Supply values for the following parameters:
Name[0]: MSSQL
Name[1]:
Stop-Service : Cannot find any service with service name 'MSSQL'.
At line:1 char:13
+ Stop-Service <<<<
    + CategoryInfo          : ObjectNotFound: (MSSQL:String) [Stop-Service], ServiceCommandException
    + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.StopServiceCommand
 
PS C:\Windows\system32>
PS C:\Windows\system32> Stop-Service MSSQL$SQLEXPRESS
Stop-Service : Cannot find any service with service name 'MSSQL'.
At line:1 char:13
+ Stop-Service <<<<  MSSQL$SQLEXPRESS
    + CategoryInfo          : ObjectNotFound: (MSSQL:String) [Stop-Service], ServiceCommandException
    + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.StopServiceCommand
 
PS C:\Windows\system32> Stop-Service -name MSSQL$SQLEXPRESS
Stop-Service : Cannot find any service with service name 'MSSQL'.
At line:1 char:13
+ Stop-Service <<<<  -name MSSQL$SQLEXPRESS
    + CategoryInfo          : ObjectNotFound: (MSSQL:String) [Stop-Service], ServiceCommandException
    + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.StopServiceCommand
ASKER CERTIFIED SOLUTION
nticaric

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros