0
這是我的工作,生成的時間字段沒有出現。Powershell格式表給我的問題
param ($redflags)
$count = 0
$n = get-eventlog $redflags -entrytype error, warning| where-object { $_.EntryType -eq 'Error' -or $_.EntryType -eq 'warning' }
$f = $n | foreach {$count++} | format-table @{Label="TimeGenerated"; Expression={$_.Timegenerated}} -autosize
$n
Write-host "The number of redflags is $count"
您收到的錯誤是什麼?考慮在你的問題中增加更多細節,因爲它可以幫助其他人提出答案。 – Joyson
你不用管任何東西到'Format-Table',所以它不會返回任何東西。 – PetSerAl