![]() ![]() We can build a query of this information using some simple PowerShell code. 6013 is not related to power cycle events, instead, it documents how long a computer has been running since the 6008 is important for recognizing when a computer may have blue screened or lost power unexpectedly. Pairing the 6000 events with 1074 gives a picture of how long Event ID’s 6006, 60 document events related to a power cycle and may or may not be useful depending on your particular situation. The previous system shutdown at time on date was unexpectedĮvent ID 1704 documents shut down events. System has been shutdown by a process/user There are five event IDs that are reserved for power up, power down and uptime events. The trick is to know what to look for and how to turn the data into something useful and easy to work with. Track and document all power up, power down and uptime situations related to runtime and power cycling. The events and their corresponding ID’s keep Microsoft writes a wealth of information to the system event log about different events related to shut-down and restart operations. One overlooked spot for restart information is the Windows Event Logs. Using PowerShell to Query Windows Event Logs But what if you need this information from a remote computer? What about multiple computers in your network? These options have limitations and can be difficult to use in scripts or across multiple machines. If you are looking for restart information for a one-off request, one of these Restart information can also be found using the Net Statistics command, looking at stats on your NIC, and getting the value of “Up Time” from Task Manager. The SystemInfo utility built into Windows displays the last restart time in an easy to digest format, but only after filtering the data:įor those more comfortable with a programmatic solution, we can pull the last restart time from WMI, but the output is hard to understand: To review uptime for many computers, the methods built into Windows aren’t designed to report information for several computers or for computers that could be in different locations. ![]() The options available for querying the “uptime” or last start time of a computer are decent, but they can be hard to find and don’t allow much flexibility. There are several ways to get the last restart time of a computer. In this article, we’ll review the options available and then look at how to get the information you need via PowerShell. To use when querying multiple computers and don’t provide historical information. Windows has several methods in place for finding restart information, but most of these solutions are difficult This command does not show version on Windows 7/Windows 10.Being able to determine when the last time a computer was restarted is a task that every support person needs to pull off at one time or another. But note that this does not show service pack version. Open command window and execute ver command. If you want to find just the OS version, you can use ver command. ![]() wmic os get Caption,CSDVersion /valueĮxample on Windows 10: c:\>wmic os get Caption,CSDVersion /valueĮxample on Windows 7: c:\>wmic os get Caption,CSDVersion /value Run the below WMIC command to get OS version and the service pack number(Windows 7 and prior versions). OS Name: Microsoft Windows Server 2008 R2 EnterpriseīIOS Version: IBM -, Check Windows version using WMIC command If you want to print more details, you may use just ‘OS’ in the findstr search pattern. c:\>systeminfo | findstr /B /C:"OS Name" /C:"OS Version" In case of Windows 7 SP1, the output would be slightly different as below. systeminfo | findstr /B /C:"OS Name" /C:"OS Version" This command works on Windows 19, Windows and on Server editions also. C:\>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |