- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-30-2022 10:55 AM - edited 06-30-2022 10:56 AM
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
06-30-2022 11:55 AM
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
06-30-2022 11:55 AM
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
07-01-2022 08:32 AM
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")
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!