I'm having trouble only displaying the Time
column for a command.
Get-EventLog -log Security | where {$_.EventID -eq 4800 -or $_.EventID -eq 4801}
returns:
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
167513 Mar 14 10:31 SuccessA... Microsoft-Windows... 4801 The workstation was unlocked....
167506 Mar 14 10:14 SuccessA... Microsoft-Windows... 4800 The workstation was locked....
167499 Mar 14 10:08 SuccessA... Microsoft-Windows... 4801 The workstation was unlocked....
However if I only want to see the Time
column I get nothing:
Get-EventLog -log Security | where {$.EventID -eq 4800 -or $.EventID -eq 4801} | Format-Table Time
Time
----
Any ideas?