有什么方法可以通过Powershell或命令提示符来查看事件的In words
部分。
我努力了
psloglist -m 120 -s -x
Get-EventLog application | ft TimeGenerated,@{label="Data";expression={[char[]][int[]]$_.data -join ""}}
但是没有一个能提供理想的输出。
最佳答案
我快速又脏了,可以在笔记本电脑上使用:
Get-EventLog application | % {
$bytes = $_.Data
while ($bytes.Length % 4 -ne 0) {$bytes = $bytes + @(0)}
for ($i = 0; $i -lt $bytes.Length; $i += 4)
{
$curWord = [System.BitConverter]::ToUInt32($bytes, $i).ToString("X8")
Write-Output $curWord
}
Write-Output ""
}
关于command-line - Windows事件的“In words”部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21521158/