Jean Lalonde Support Forum

Full Version: [Tools-Win] WMI and QAP Part 1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Long read.... very, very long read.

NOTE!
This is the first post in a (possible) series of post on how you can use WMI and QAP to get a fast and console/command line based answer to some technical queries.
I am not quite sure where I am going with this, but I'll post descriptions of what I do in an environment with around 30 virtual machines, 4 phsycial hosts (machines) and how I use QAP.

It is a plethora of tools out there for everything related to system information, task managers, query tools, WMI browser, network monitors etc.
And, I probably use a fair amount of those. But, this is more of "how do I get that information fast without starting my usual toolbox" kind of thingy.

Everything is based on internal Windows tools, but you may possibly want/have to do some downloading from Microsoft.


NOTE 2
I am not going to cover details here, I assume that the reader has an understanding of QAP, how you can custoimize it, change settings, create UserVars, Snippets and so forth.

What is WMI?
https://en.wikipedia.org/wiki/Windows_Ma...umentation

What is PowerShell?
https://en.wikipedia.org/wiki/PowerShell


Easy start in to WMI - CMD
There is an old tool that has been around forever, wmic (WMI Command line) that works perfectly fine in CMD.
Test it:
Start a terminal (WIN+R), type cmd
Type:
"wmic useraccount get caption" (without the quotes)
Congratulations, you have just queried WMI for the usernames on your system using wmic.

Easy start in to WMI - PowerShell
Let's do this in PowerShell
Test it:
Start a terminal (WIN+R), type powershell (or pwsh if you have download PS 7)
Type:
"gcim -ClassName Win32_UserAccount | Select-Object caption"
Congratulations, you have just queried WMI for the usernames on your system using a CmdLet (Command let) in PowerShell.
("gcim" is actually an alias for a CmdLet in PowerShell, Get-CimInstance)

As you have noticed, QAP is not in here......and Jean may choose to hit me on my head......
But I'll keep it calm, fool around with wmic and PS, then we will dive into the more complex (but very easy) ways of using QAP and WMI in part two.

As always, if you can use this, cool.
Regards,
joeNOR