2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

今日のPowerShell ERROR 読み取り中にログが削除された可能性があ ります。インデックス 5062 が境界を越えています。

Last updated at Posted at 2019-09-10

ログオフ時間をコマンドで取る

Powershell
> Get-EventLog system -After 2019-07-01 | Where-Object {$_.EventID -eq 7002} | Sort-Object Index | Se
lect-Object TimeGenerated
Get-EventLog : 次のエラーのため、ログ "system" の読み取りを完了できませんでした。読み取り中にログが削除された可能性があ
ります。インデックス 5062 が境界を越えています。
発生場所 行:1 文字:1
+ Get-EventLog system -After 2019-07-01 | Where-Object {$_.EventID -eq  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (:) [Get-EventLog], ArgumentException
    + FullyQualifiedErrorId : LogReadError,Microsoft.PowerShell.Commands.GetEventLogCommand
    + 

参考資料

【 Get-EventLog 】コマンドレット――Windowsのイベントログを取得する
https://www.atmarkit.co.jp/ait/articles/1608/23/news023.html

Get-EventLog
https://forsenergy.com/ja-jp/windowspowershellhelp/html/a4372a60-b7d9-4b1c-a268-aa5240300141.htm

PowerShellでイベント・ログの内容を参照する
https://www.atmarkit.co.jp/fwin2k/win2ktips/1036psevent2/psevent2.html

参考資料 on Qiita

PowerShellでWindowsイベントログを取得する
https://qiita.com/gtom7156/items/f2e29d2abadb0134560f

Windows のイベント ログに特定のイベントが記録されたら LINE WORKS の Bot で通知
https://qiita.com/iwaohig/items/8853ed4433f6653396c2

WindowsPowerShell入門 - 日付毎に最後のイベントログを表示する
https://qiita.com/myokoym/items/cd3242b8a791b030b327

文書履歴(document history)

ver. 0.01 初稿 20190910
ver. 0.04 URL追記 20230228

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?