XQL query Host Inventory numerical values Services

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

XQL query Host Inventory numerical values Services

L3 Networker

When running xql queries against host inventory i have 2 questions

1.

Is there documentation that states what each field means in the array

The example below " start mode" and "state" are numerical

It appears start mode3= "Service Manual Start" but i need a full list to show what number represents stopped, paused...etc

 

2.

Once i know start mode3 = service manual start

How can i use xql to change the result to reflect the name instead of numerical value

 

 {
    "accept_pause"false,
    "accept_stop"false,
    "delayed"false,
    "desktop_interact"false,
    "display_name""displayname",
    "path_name""path",
    "service_name""name",
    "service_type""SERVICE_WIN32_SHARE_PROCESS",
    "start_mode"3,
    "start_user_name""NT AUTHORITY\\LocalService",
    "started"false,
    "state"1
1 accepted solution

Accepted Solutions

L3 Networker

Hi @NathanBradley ,

 

Thanks for reaching out to Live Community discussion board.

 

1. Unfortunately there isn't a description available. We are working continuously in providing more insights in the XQL value definitions. This information is coming directly from Microsoft and you can identify the meaning of each value behind here.

 

2. You should be able to leverage the alter function in order to obtain your desired results. More information is available here.

 

e.g 

 

| alterstart_mode = replace(replace(replace(start_mode, "1", "Service Manual Start"),"2", "Service Manual Stop"), "3", "Service Automated")

 

Please let me know if you have any questions or concerns!

 

Thanks,

Silviu

Silviu-Mihail Dascalu

View solution in original post

2 REPLIES 2

L3 Networker

Hi @NathanBradley ,

 

Thanks for reaching out to Live Community discussion board.

 

1. Unfortunately there isn't a description available. We are working continuously in providing more insights in the XQL value definitions. This information is coming directly from Microsoft and you can identify the meaning of each value behind here.

 

2. You should be able to leverage the alter function in order to obtain your desired results. More information is available here.

 

e.g 

 

| alterstart_mode = replace(replace(replace(start_mode, "1", "Service Manual Start"),"2", "Service Manual Stop"), "3", "Service Automated")

 

Please let me know if you have any questions or concerns!

 

Thanks,

Silviu

Silviu-Mihail Dascalu

L3 Networker

thanks that works for me these are the 2 lines added

| alter state = replace(replace(replace(replace(replace(replace(replace(state, "1", "Start_Pending"),"2", "Stop_Pending"), "3", "Running"), "4", "Continue_Pending"), "5", "Pause_Pending"), "6", "Paused"), "0", "Stopped")
| alter start_mode = replace(replace(replace(replace(replace(start_mode, "4", "Disabled"),"2", "Automatic"),"0", "Boot"),"1", "System,"),"3", "Manual")

  • 1 accepted solution
  • 2194 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!