

You could use any of these methods to get the system boot time. After executing, two variables are created: Result-contains successful. In this Powershell tutorial, we have seen how we can get the system boot time using one of the following methods: Very fast displays system information on a local or remote computer.

The command output looks like the screenshot below. The output of this command tells you the date on which the system booted. Net statistics workstation | select-string “statistics” The net statistics command can help you in collecting the system boot time information through a single command. System boot time using netstatistics command in Powershell The command output offers system boot time in terms of days, hours, and minutes for easier understanding. The output of this command looks like the screenshot below. (get-date) – (get-ciminstance Win32_OperatingSystem). The command using CIM Instance is shared below: With a single command, you get the system boot time information that is organized well. The CIM Instance method offers system boot time in the standard date format. So, you will need to convert the WMI format to standard date format using one of the functions.Īlternatively, you could look at CIM Instance method to pull system boot time details in the standard date format in Powershell.ĬIM Instance to get system boot time in Powershell The output of this command shows the system boot time in WMI format. Get-WmiObject Win32_OperatingSystem | Select Lastbootuptime The exact command to get the system boot time using the WMI Object method is given below. The WMI Object method will use the Win32_engineering class to get the system boot time. WMI Object method is another good way to fetch system boot time details. For example, PS C:\> System.Environment::OSVersion. For the version number, there is the Version property. NET library, you could access the OSVersion property of the System.Environment class to get this information. System boot time using WMI Object in Powershell 1 2 Next 237 Since you have access to the. The command output above shows that the system booted up on 7th December 2022 at 0934 hours. We have displayed the command output below in the screenshot. The output of this command is easier to comprehend. System boot time details can be fetched using the following systeminfo command in Powershell: The Systeminfo command remains one of the most used cmdlets to find system information in Powershell. System boot time using systeminfo in Powershell From this number, we infer that the system booted on 7th December 2022 at 0934 hours. The number 20221207093431 contains the actual timestamp of the system boot time. The command output for this command looks like the screenshot below. The exact command to find the system boot time using the wmic command is: The only thing that may sound cumbersome is about making sense of the command output for wmic since the reported time is in the WMI format. The simplest and quickest way to find the system boot time is by using the wmic command. You could replicate any of these commands for finding the system boot time on a local or remote computer.įind System boot time using wmic command in Powershell All these five commands are discussed below with command output screenshots. We will look at finding system boot time in Powershell using five different methods or commands. It is a very useful indicator for the servers, and helps in establishing reliability of the server uptime statistics.

System boot time refers to the timestamp when the system booted up. There are multiple ways by which you can organize the system boot time information. Get-Content -Path C:\Computers.System boot time for a local or remote computer can be easily fetched using Powershell cmdlets. $ErrorResult | Get-SystemInfo -Protocol WSMAN -AppendToResult
