banner



How To Check Last Reboot Time In Windows Server 2003

You can get the last kick time of the calculator or remote computers using the PowerShell script. cyberspace stats, systeminfo, wmic (windows management instrumentation), and Get-WmiObject is used to get the terminal kicking fourth dimension of the computer.

Get last boot time of computer
Get last boot time of reckoner

In this article, we volition discuss different ways to find the final boot time of a computer or multiple computers.

Get last boot fourth dimension of computer using Get-CimInstance

You can utilize the PowerShell Get-CimInstance cmdlet to become the system terminal kick time.

Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime

In the in a higher place PowerShell script example,

Get-CimInstance uses win32_operatingsystem class name to get system information and passes the data through the pipeline operator to the 2d control.

In the second command, it selects csname and lastbootuptime property and displays the final kicking fourth dimension of the local computer.

The output of the above script is as given beneath

          PS C:\> Become-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime                                                                                                      csname         lastbootuptime ------         -------------- INCORP-EU-D101 21-ten-2021 16:00:35        

Find final reboot time of computer using net statistics

The net statistics control displays statistics virtually the system like bytes received, arrangement errors, terminal boot time of estimator, total uptime of computer from last boot of computer.

net statistics workstation | select-string "Statistics"

In the above PowerShell script,

net statistics command gets the terminal kicking time of the estimator.

The output of the above command is given below

          PS C:\> net statistics workstation | select-string "Statistics"                                                                                                                               Workstation Statistics for \\INCORP-Eu-D101 Statistics since 21-ten-2021 16:01:28                  

Become last kicking time of computer using systemInfo

You lot can use the systeminfo command to get the last kick time of the figurer.

systeminfo | Select-String "Host Proper noun","System Boot Time"

The above control gets the last reboot time of the local computer and prints Host Name and System Boot Time on the terminal as given below

          PS C:\> systeminfo | Select-String "Host Name","Organisation Kicking Time"  Host Name:                 INCORP-EU-D101 Organization Kick Time:          21-10-2021, 16:00:35        

You tin use the systeminfo control to get the last kicking time of the remote computer using the beneath command

systeminfo /S "incorp-european union-D102" | Select-String "Host Name","System Boot Time"

In the higher up control,

systeminfo uses /Due south parameter to specify the server name.

It returns the last boot time for the remote computer.

Become last boot time of computer using Go-WmiObject

You lot can utilise the PowerShell Get-WmiObject command to become the last boot time for your estimator using the given below control

Get-WmiObject win32_operatingsystem | select csname, @{LABEL='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}}

In the above PowerShell script,

The go-WmiObject control uses win32_operatingsystem class to get the calculator proper noun and lastbootuptime for the reckoner.

Information technology returns the lastbootuptime in big integer format which needs to convert to a readable format.

The output of the above command is given beneath

          PS C:\>  Get-WmiObject win32_operatingsystem | select csname, @{Label='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}}  csname         LastBootUpTime ------         -------------- INCORP-EU-D101 21-10-2021 16:00:35        

Check Final boot time of computer using wmic

You tin employ the wmic command to get the concluding boot fourth dimension of the reckoner as given below

wmic Os get lastbootuptime

How to check windows reboot history?

Yous can use the Become-WmiObject cmdlet in PowerShell to check windows reboot history using outcome lawmaking 6005.

Use the given below control to get windows reboot history

Get-WmiObject Win32_NTLogEvent -filter "LogFile='System' and EventCode=6005" | Select ComputerName, EventCode, @{Label='TimeWritten';EXPRESSION={$_.ConverttoDateTime($_.TimeWritten)}}        

In the higher up PowerShell script,

Get-WmiObject cmdlet in PowerShell uses Win32_NTLogEvent to filter events by eventcode equal to 6005 and returns windows reckoner reboot history.

Conclusion

I promise the above article on how to go the last boot time of local computer and reboot fourth dimension of remote computer using unlike ways in PowerShell.

We have learned in the to a higher place commodity how to go the reboot history of a computer using the Get-WmiObject cmdlet in PowerShell.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek habitation folio.

Source: https://shellgeek.com/get-last-boot-time-of-computer-using-powershell/

Posted by: chamberscomefultall1961.blogspot.com

0 Response to "How To Check Last Reboot Time In Windows Server 2003"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel