Search Suggest

How to Find who/ when restarted your Windows Server.


How to Find who/ when restarted your Windows Server.


------------------------------------------------------------------------

Open PowerShell window and execute the command.

Get-EventLog System | Where-Object {$_.EventID -eq "1074" -or $_.EventID -eq "6008" -or $_.EventID -eq "1076"} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize –Wrap


if you observe, the output is quite big, hence you can redirect the output to notepad

PS C:\>Get-EventLog System | Where-Object {$_.EventID -eq "1074" -or $_.EventID -eq "6008" -or $_.EventID -eq "1076"} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize –Wrap >output.txt

PS C:\> notepad output.txt

You will get its output on notepad file a. 




if you need to find last reboot date & Time time then below command will help
----------------------------------------------------------------------------------

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


Thanks for Reading.. 

Post a Comment