Get-WmiObject is a powershell cmdlet that allows WML queries to be run against WMI objects on the local or remote computers.
Questions tagged [get-wmiobject]
190 questions
0
votes
1 answer
Attempting to convert value into integer
I am very new to Powershell (I have only just poked around in the ISE a little bit for the last couple of days). I'm working on a program to pull battery capacity values from Windows systems and I am stuck in my code.
I want to perform arithmetic…

Xeryn
- 1
- 1
0
votes
1 answer
Trying to get FullChargeCapacity from Win32_PortableBattery Class
I'm trying to get full charge capacity of remote notebook battery info in our company, but it returns empty output when I run the code. I did some googling and I know I need to ask the driver of the battery for the info (can be found in registry too…

Michal Košík
- 1
- 1
0
votes
1 answer
GWMI Win32_NetworkAdapterConfiguration - Display Description and IP Address but only IPV4 (Exclude IPV6)
relatively new to Powershell.
I'm trying to output the Description and IPAddress values from the following code, without it outputing the IPV6 addresses with it.
I want the Description and the IPAddress values, I've managed to get it to output just…

FrostyH23
- 3
- 1
0
votes
2 answers
powershell get-wmiobject wildcards - Batch File
powershell get-wmiobject wildcards - Batch File
I´m struggling with on batch file here.. The idea is to get the version of the applications installed on a remote pc, but instead of writing the full application name ( that can be a bit different…

Tiagoeb
- 1
0
votes
0 answers
Try Catch not working for Get-WMIOjbect Win32_LogicalDisk
I have a script that checks on disk size and percentage used for my servers. When everything is correct, it works. However, it seems like the Try-catch fails to catch any errors. The script merely writes a message to the console, then quits the…

Mike Lusicic
- 1
- 1
0
votes
1 answer
Get-WmiObject delay outcome when check C disk storage
Get-WmiObject delay outcome when check C disk storage.
When I input my computer name and type '1' to check the C disk storage, the first time won't return the outcome, and I need to type '1' again it will return both the first and second…

Leon J
- 1
- 1
0
votes
1 answer
where can i find the Get-WmiObject file location in powershell?
I would like to change some code in the Get-wmiObject file itself to do some functionality for me and replace some others. most important thing is to change some command output for some reason. how can i do that or is it possible ?

Twfyq Bhyry
- 150
- 1
- 10
0
votes
1 answer
PowerShell command to get installed application/software version
I need to read product version from control panel for specific application. I'm using this command till now.
Get-WmiObject Win32_Product -Filter "Name like 'ISASmaartHub'" | Select-Object -ExpandProperty
after upgrading my system to Windows 11 it…

Shivani G
- 71
- 2
- 13
0
votes
0 answers
is there a way to query HBA ports state in Windows Server?
I am using WMI Classes to query all kinds of information from servers. The reason I am using WMI Objects is because I work with versions of Windows Server 2003 to Windows Server 2022 (PS 1.0 to 5.X). But now I need to query FC ports in multiple…

Carlos Pérez
- 47
- 1
- 1
- 9
0
votes
1 answer
NodeJS get CPU temperature - Use OpenHardwareMonitorLib.dll in NodeJS
I'm trying to get the CPU and GPU temperatures of my computer that I connect via ssh. When I try wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature command I got this error ;
Node - ADMIN
ERROR:
Description = Not…

Didem
- 63
- 1
- 4
- 10
0
votes
1 answer
Exception calling "GetOwner"
team!
Recently, my remote pssession scripts has failed under getting owner of processes.
#Some code up and down the fragmet
#Use WMI or CIM cmdlets.
$UseCIM = !( Test-GetWMIObjectPresent ) #local function to choose CIM or WMI…

Alexey I. Kuzhel
- 126
- 10
0
votes
1 answer
How to get output of PowerShell's Get-WmiObject in C#
I need to get which network interface is connected to which network. I found that this information is accessible in MSFT_NetConnectionProfile. Unfortunatelly I cannot access it directly from C# (I get ManagementException: Provider load failure on…

Jirka Picek
- 589
- 5
- 19
0
votes
0 answers
How to create share and grant multiple permissions on Windows8 using script
Requirement : I want to create a script to manage share and assign multiple permissions on windows 8 machine using NET SHARE command. It doesn't support SMB modules( New-SmbShare and Set-Smbshare) as this module is not compatible with Windows 8. So…

Vidhi Chhabra
- 1
- 1
- 4
0
votes
0 answers
changing Log-On Account for service with powershell
I have csv file with mass data - service name, computer name, account name.
I wrote a script that:
takes the data from the file
renames for each service the name of the user who runs it
generates a password for it
updates it in AD and in the…

pppuser
- 1
0
votes
1 answer
i trying to collect different info with Get-ADComputer, Get-WmiObject and Get-windowsfeature
I am trying to collect different properties from all computer listed from my AD but I can't get format to recolected querys
I run get-adcomputer query
$computerList = Get-ADComputer -Filter 'Name -like "SCPW*" -and ObjectClass -eq "Computer"' |…