Guest User

Untitled

a guest
Jul 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. $arrShutdown = Get-EventLog -LogName System -EntryType Information -InstanceId 2147484722 | sort-object $_.Time -descending
  2. foreach ($item in $arrShutdown)
  3. {
  4. $UserName = $item.UserName
  5. $Message = $item.Message
  6. $Time = $item.TimeGenerated
  7. write-host "UserName `t:$username `nTime `t`t:$time `nMessage `t:$Message `n`n"
  8.  
  9. }
Add Comment
Please, Sign In to add comment