Questions tagged [wmi-query]

Query over the content of CIM repository on Windows Machines that uses WQL (Windows Management Instrumentation Query Language ).

545 questions
0
votes
1 answer

How to get memory range used by a specific device with WMI (Windows Management Instrumentation)

How can I get the resources used by a specific device (in particular, the memory range) of a specific device knowing it's name and/or DeviceID and/or the Pci bus number, Device number and function number? For example, I want to know what memory…
Jubba
  • 87
  • 2
  • 7
0
votes
3 answers

Why Linq-to-WMI `where` query doesn' work?

This doesn't work (0 items): var cfg = from n in context.Source() where n.Description == theDescription select n; But this does: var cfg = new List(); var x = from n in…
Tar
  • 8,529
  • 9
  • 56
  • 127
0
votes
1 answer

WMIService file results sometimes give "object does not support this property"

I am trying to modify all shortcuts on a computer. The script works fine but every now and then throws an error that the .Target property of an object is not available. Since my query only looks up files with a .lnk extension, this should never be…
0
votes
1 answer

is control panel program list is similar to the win32_product list...?

My task is to list all the software programs that are installed in my desktop. will i use the win32_product for displaying this list. will the following query works for this...? select * from win32_product;
Gomathipriya
  • 905
  • 7
  • 19
  • 38
0
votes
1 answer

Enumerate Properties collection in vb.net

Microsoft's article, ManagementBaseObject.Properties Property, shows how to enumerate the properties in a collection For Each p As PropertyData In properties Console.WriteLine(p.Name) For Each q As QualifierData In p.Qualifiers …
simon
  • 3
  • 2
0
votes
1 answer

How to know which service fire this __InstanceModificationEvent event?

I have simple codes to track service state. But in my code, i can just know service started or stopped. I want to know which service started or stopped. Here is my code samples. This is main function: public void TrackService() { …
mburakerbay
  • 63
  • 11
0
votes
1 answer

how to get WMI events?

How to list the WMI events registered to Msvm_ComputerSystem class. I have created a vm and have an event to registerpoweronEvent. now i want to list the events registered. please help in this.
0
votes
2 answers

Test to see if directory is shared using PowerShell?

This seems like a very easy thing to do; however, I don't know anything about WMI. How would I go about determining if a directory is shared over the network on one of my servers (using PowerShell)? Also, is there a quick primer that I can read to…
EGr
  • 2,072
  • 10
  • 41
  • 61
0
votes
1 answer

How to make a script only run once per user by gpo?

I have been searching the web and i came up with NO results while it seems so convenient to have! Background information: With basic netlogon batchfiles i used a write a checkfile in a temp folder to check if this script has already ran so it…
Tiele Declercq
  • 2,070
  • 2
  • 28
  • 39
0
votes
2 answers

How can I get a list of Active Directory Users (Only the Users that appear in the windows Logon Screen)

How can I get a list of Active Directory Users (Only the Users that appear in the windows Logon Screen) I have tried many methods using Windows Principle library & WMI Select commands. I keep getting Admministrator, Guest & some other VUSRNEIL-DELL.…
Neil Hobson
  • 515
  • 1
  • 7
  • 14
0
votes
1 answer

how many times software has been installed and uninstalled on a computer

Is there any way (in C#, using WMI classes) to find out that how many times a particular software has been installed and uninstalled? I want to run it on remote computer. I am getting software list by following code: ManagementScope scope = new…
Mohammad Arshad Alam
  • 9,694
  • 6
  • 38
  • 61
0
votes
3 answers

How to Change Scheduler Task User Password

When I Create Scheduler Task with the Username and Password in Windows 7 using Task Scheduler GUI and trying to Change the Password of User using Following Command line, it give me error in CMD SCHTASKS /Change /RP test /TN "rtest1" Error: The…
John
  • 703
  • 7
  • 18
  • 37
0
votes
1 answer

Creating a Win32_LocalTime _instancemodificationevent non repeating event

I have a question that I dont seem to be able to find an answer to. I am using WMI to create some timed events, and so far they are working well. The events repeat on the scheduled cycle as expected. I am now searching for a way to create a…
The Frog
  • 85
  • 7
0
votes
1 answer

WMI GetObject Error

On Windows XP, in my vbscript, I am using GetObject("winmgmts:\.\root\cimv2") to get WMI service object, but always get error: (null): Invalid syntax. I checked the syntax, it should be ok. I even tried to rebuild the Repo as suggested here , but…
ericyoung
  • 621
  • 2
  • 15
  • 21
0
votes
2 answers

Why is this WMI query hanging on the second time it's called?

The following WMI query throws an exception at serverProtocolsManagement.Get() when sqlHost is an invalid server name (as expected. However, if I try to invoke this code again with the same invalid parameter, the ManagementScope constructor hangs…
Mark Carpenter
  • 17,445
  • 22
  • 96
  • 149