运行以下
Get-WinEvent -ComputerName $env:ComputerName -LogName Application | Where {$_.ID -eq 63} | Select-Object -Unique
结果如下
ProviderName: Outlook
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
10/17/2014 10:09:04 AM 63 Information The Exchange web service request GetAppManifests succeeded.
如何删除或删除以下内容
ProviderName: Outlook
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
所以我刚刚离开
10/17/2014 10:09:04 AM 63 Information The Exchange web service request GetAppManifests succeeded.
答案 0 :(得分:1)
将输出传输到Format-Table:
Get-WinEvent -ComputerName $env:ComputerName -LogName Application `
| Where {$_.ID -eq 63} | Select-Object -Unique `
| Format-Table -HideTableHeaders
如果要将输出转换为字符串,可以进一步管道到Out-String
。