2014-10-17 58 views
1

運行以下PowerShell的:從刪除信息獲取-WinEvent返回的結果

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.                            

回答

1

管你的輸出格式表:

Get-WinEvent -ComputerName $env:ComputerName -LogName Application ` 
    | Where {$_.ID -eq 63} | Select-Object -Unique ` 
    | Format-Table -HideTableHeaders 

如果你想在輸出字符串轉換,您可以進一步管Out-String