Questions tagged [get-wmiobject]

Get-WmiObject is a powershell cmdlet that allows WML queries to be run against WMI objects on the local or remote computers.

190 questions
0
votes
0 answers

Uninstalled Program(s) still appear in WMI Object "WIN32_InstalledStoreProgram"?

I was solving vulnerabilities on a Test PC VM at my current job to test some new procedures, and one of the vulnerabilities involved the pre-installed application "Paint3D" (Specifically QID 91774 for those interested). Long story short, the…
0
votes
0 answers

Why do I receive an "RPC error" when using Get-WmiObject on a Netapp SVM

How can i get this to show me who's using the shares on our NETAPP. $computer = "gozer" $namespace = "root\CIMV2" # note to self find out if this is correct $userSessions = Get-WmiObject -class Win32_ServerConnection -computername $computer…
rob_h
  • 1
  • 1
0
votes
2 answers

Check if Windows is activeted via wmi filter

I want to get a message if Windows not activated I create gpo that run message on logon If i run this filter via wmi filter Get-wmiobject -query 'select licensestatus from softwarelicensingproduct where LicenseStatus like 1' I get the message. But…
yosi
  • 65
  • 6
0
votes
2 answers

'get-ciminstance win32_userprofile -CimSession | select' WITHIN DO & SWITCH statements doesn't work

Cmdlet below works normally, but does nothing within a do & switch statement in code block at bottom? Debugging in ISE doesn't provide any help. Removing | Select-Object does make it function, but produces too much info. Removing -CimSession…
gregg
  • 1,084
  • 1
  • 12
  • 25
0
votes
0 answers

How to locate a specified file types in Windows using Powershell command

I have several Windows machines and I am trying to ps remote into each one to run a command that will scan the entire host for specific file types while also tell me where they are located. So far, I've have the following command which work on most…
doggo_star
  • 11
  • 1
  • 3
0
votes
1 answer

Snapshot WMI Query returns nothing

-> $VMs = Get-WmiObject -Class "Msvm_ComputerSystem" -Namespace "root\virtualization\v2" -> $vm = $VMs[1] -> Get-WmiObject -Namespace "root\virtualization\v2" -Query "Associators Of {$vm} Where AssocClass=Msvm_ElementSettingData…
Recep
  • 3
  • 2
0
votes
1 answer

local path of a share using wmi c#

I'm trying to make an .exe , that can list me the physical path(using WMI query)of a shared folder from the shared s name . I'm trying to add the name of the share to the query as a 'Filter' (where ) I'm having issues with the query and get an…
prider
  • 23
  • 5
0
votes
1 answer

Get-WmiObject to combine to outputs

I was executing below script to obtain the server patch version of Skype for business servers. I need the output as server patch name, version and computername. $x = Get-Content "E:\temp\servers.txt" foreach ($y in $x) { Invoke-Command…
divya m
  • 3
  • 1
0
votes
0 answers

PowerShell Script to list both CPU and GPU temperature

I'd like to grab from multiple machines CPU/GPU Temperature So basically i`d like an output like this COMPUTER NAME CPU TEMPERATURE GPU TEMPERATURE COMPUTER001 80 Degrees 70 Degrees then a list of every computer in a table or even…
0
votes
1 answer

Can WMI query a class property and filter using another class property?

I am a WMI noob. I'm using BGInfo and have a device with 2 NICs. I'm trying to query the IP address of one of the NICs. I want to submit a query based on the name of the NIC. However, I'm running into an issue where the IP address is stored in…
Izzo
  • 4,461
  • 13
  • 45
  • 82
0
votes
0 answers

How to use Get-WmiObject's class Win32_Processor with multi processor machines

In a multi processor machine, what does get-wmiobject -class 'win32_processor' processorId return ? The docs state Remarks On a multiprocessor computer, one instance of the Win32_Processor class exists for each processor. But where in the…
Veverke
  • 9,208
  • 4
  • 51
  • 95
0
votes
2 answers

Difference between DNSHostName and Name in WMI ComputerSystem properties

These 2 properties appear to be set to the same values on a standard Windows domain environment. Can they be different? How can they be set to different values? e.g. $computer = Get-WMIObject…
SturmUndDrang
  • 1,876
  • 5
  • 27
  • 47
0
votes
1 answer

Get-WMIObject Win32_NetworkAdapterConfiguration - Looping through X number of DNS Servers for each NIC

For a group of computers, I want to connect to each one, enumerate each NIC that has a real IP, and for each NIC I want to loop through each DNS server (first, second, third, fourth, fifth etc) and if it contains a specific IP (e.g. 8.8.8.8) I want…
Aziz
  • 283
  • 1
  • 14
0
votes
1 answer

Getting output as infinite or Nan

I have tried the below command to get the memory usage of the computer but getting error as infinite or NaN. $Totalsizemem=gwmi Win32_PhysicalMemory | Measure-Object -Property capacity -Sum | Foreach {" {0:N2}" -f ([math]::round(($_.Sum /…
Srishti
  • 13
  • 3
0
votes
2 answers

Win32_Product install location of a software using powershell in windows but it is coming null or empty

I am using the command Get-WmiObject -Class Win32_Product in powershell to find the InstallLocation of a software installed in windows. It is showing me no value in it. What is the reason many softwares installed in windows do not have…