Link to home
Start Free TrialLog in
Avatar of bibi92
bibi92Flag for France

asked on

script cmd for detecting sqlserver services and read key edition

Hello,

I search a script for detecting sqlserver services and read key edition.

Thanks

Regards

bibi
Avatar of ienaxxx
ienaxxx
Flag of Italy image

Hi,

sc query <SERVICE_KEY_NAME> will do the trick.

for example: sc query MSSQLSERVER

It's not clear what do you mean with read key edition.


You can get service key name reading the properties from services.msc console.

HTH
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And of course you can run it against a SQL box by using SQLCMD utility at a command prompt if that's what you'd like.
Avatar of bibi92

ASKER

Thanks bibi