- Sep
- 134
- 1
By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!e:\utils>pshell /s "Get-EventLog -LogName System -Source "EventLog" -EntryType Error | Where {$_.EventID -eq 6008}"
PS E:\utils> Get-EventLog -LogName System -Source "EventLog" -EntryType Error | Where {$_.EventID -eq 6008}
Get-EventLog : No matches found
At line:1 char:1
+ Get-EventLog -LogName System -Source "EventLog" -EntryType Error | Wh ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Get-EventLog], ArgumentException
+ FullyQualifiedErrorId : GetEventLogNoEntriesFound,Microsoft.PowerShell.Commands.GetEventLogCommand
_x64: 1
_admin: 1
_elevated: 1
TCC 27.00.17 x64 Windows 10 [Version 10.0.18363.1256]
PShell /S "Get-EventLog System -Source 'Microsoft-Windows-Kernel-Power' -newest 25 | Where-Object {$_.InstanceID -eq 42} |Format-Table Timegenerated"
Get-EventLog System -Source 'Microsoft-Windows-Kernel-Power' -newest 25 | Where-Object {$_.InstanceID -eq 42} |Format-Table Timegenerated
v:\> PShell /S "Get-EventLog System -Source 'w32tmsvc' -newest 5 | Format-Table Timegenerated"
TimeGenerated
-------------
2020-12-28 02:18:27
2020-12-27 02:18:27
2020-12-26 02:18:29
2020-12-25 02:18:27
2020-12-24 02:18:27
e:\utils>pshell /s "Get-EventLog System -Source 'Microsoft-Windows-Kernel-Power' -newest 25 | Where-Object {$_.InstanceID -eq 42} |Format-Table Timegenerated"
TimeGenerated
-------------
2020-11-12 1:03:45 PM
e:\utils>runspace.exe test1.ps1 & echo End Of Job
TimeGenerated
-------------
2020-11-12 1:03:45 PM
End Of Job
Get-EventLog System -Source 'Microsoft-Windows-Kernel-Power' -newest 25 | Where-Object {$_.InstanceID -eq 42} |Format-Table Timegenerated
Get-EventLog System -Source 'Microsoft-Windows-Kernel-Power' -newest 5
e:\utils>pshell /s "Get-EventLog System -Source 'Microsoft-Windows-Kernel-Power' -newest 5"
Index Time EntryType Source InstanceID Message
----- ---- --------- ------ ---------- -------
122369 Dec 25 11:09 Information Microsoft-Windows... 172 The desc...
122305 Dec 25 11:08 Information Microsoft-Windows... 109 The desc...
121715 Dec 23 09:51 Information Microsoft-Windows... 172 The desc...
121648 Dec 23 09:50 Information Microsoft-Windows... 109 The desc...
120866 Dec 19 19:04 Information Microsoft-Windows... 172 The desc...
_x64: 1
_admin: 1
_elevated: 1
TCC 27.00.17 x64 Windows 10 [Version 10.0.18363.1256]