使用如下:
$pattern = 'Unable to create Load Balance Manager object!'
$events = Get-WinEvent -ea SilentlyContinue `
-ProviderName "Hyperion Financial Data Quality Management - Task Manager Service"|
Where-Object { $_.TimeCreated -gt [datetime]::now.AddMinutes(-15) -and $_.Message -match $pattern }
$events >> G:\Sysadmin\FDMmonitor\Error.txt
我得到 Error.txt 如下:
TimeCreated ProviderName Id Message
----------- ------------ -- -------
1/24/2014 11:41:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:41:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:41:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:40:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:39:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:39:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:39:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:39:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:38:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:37:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:37:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:37:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:36:... Hyperion Financi... 0 Unable to create...
1/24/2014 11:36:... Hyperion Financi... 0 Unable to create...
我没有得到,为什么TimeCreated, ProviderName and Message
不提供全文?
我需要在代码中进行哪些更改才能为这些列获取更多文本?