Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Something like `eventquery.vbs /l application /FI "Datetime ge DATETIMESTR" /v`
- Get-EventLog Application | Where-Object { $_.TimeGenerated -ge [DateTime]"2014/01/31 09:00:00" } | Sort-Object TimeGenerated | Format-Table -AutoSize -Property EntryType, InstanceID, TimeGenerated, Source, Machinename, Category, UserName, Message | Out-String -Width 4096 -Stream | %{ $_.TrimEnd() }
- # When you run "powershell -c", PowerShell will do auto-wrapping unless you attach the following statement at first.
- # It will attach a long scrollbar to your console. Use Out-File instead, if possible...
- $host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(4096, 256);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement