LoginSignup
5
6

More than 5 years have passed since last update.

PowerShellでWindowsイベントログから指定日のPC起動/停止時刻を把握

Posted at

件名の通り。
自分の勤怠を思い出すために作成。

$targetDate = date('2017/02/10')
$events = get-eventlog system -before $targetDate.addDays(1) -after $targetDate
$events | select-object -last 1 TimeGenerated
$events | select-object -first 1 TimeGenerated

指定日のログを取得し、最初の1件と最後の1件を表示。

5
6
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
5
6