Convert To Date Time(\RSLAPTOP01\root\cimv2: Win32_Operating [email protected] Last Boot Up Time) so we can use a sub-expression PS Write-Host “Boot up Time $($machine. Last Boot Up Time))” Boot up Time 08/23/2010 but we end up with date that has changed format and is confusing if you are used to DD/MM/YYYY as we use in the UK.
Last Boot Up Time)” \RSLAPTOP01\root\cimv2: Win32_Operating [email protected]
A question on the forum asked about extracting the year from the Release Date property returned by Win32_BIOS They were trying to do this: Get-Cim Instance Win32_BIOS | Select-Object @ There are 2 problems with this approach – firstly the objects that Get-Cim Instance produces don’t have the Convert To Date Time method (its added by Power Shell to the objects produces by Get-Wmi Object) and secondly on a Date Time object Year is a property not a method.
If you use the WMI cmdlet you see this £ A blog for Windows administrators, Architects, Consultants and System Integrators maximizing the use of Power Shell and WMI.
In scripting, use the SWbem Date Time object to convert these to regular dates and times.
Unfortunately, I didn’t have a script written to do this remotely with WMI and I needed to get it done very quickly…
PRTG comes with 10 built-in technologies such as email, push, SMS text messages, play alarm audio files, or triggering an EXE file or HTTP requests.
Our free push notifications help you stay up to date when using your mobile device(s).
For more information about how to use the script to obtain data from remote computers, see Connecting to WMI on a Remote Computer.
The following procedure describes how to run a script.
The information is in the Coordinated Universal Time (UTC) format.