-
You always get back all instances of a given WMI class when using Get-WMIObject. However, what if you just wanted to get a specific instance? Or you just wanted to find out how much space is left on drive C:? The next line gives you all drives: Read More
-
So this is a script we used to get some event log infomation (the one additional thing it has over get-eventlog is it gets the location and actual size of files etc) The issue the file kinda worked (it was running over 24hrs with only a few results. After rebooting the machine the script would no longer...
-
I have the following code I use to try to change the settings on our servers from dhcp to static. It gets "hung" up on the enablestatic() peice, I know its because after it changes the ip it looses the connection but how do I get Powershell to either fork off this command or time out earler...
Posted to
Using WMI
(Forum)
by
adrian
on
02-27-2010
Filed under: WMI, Get-WMIObject, Remoting, Win32_NetworkAdapterConfiguration
-
I know I can get the status of a service using this command: get-wmiobject win32_service |where {$_.name -match "bits"} to return all the properties I need (Name, StartMode, and State). ExitCode : 0 Name : BITS ProcessId : 820 StartMode : Manual State : Running Status : OK That's a good...