Arn*_*psa 14 powershell event-log
使用PowerShell检索有关事件的信息时消息列被修剪并且太短:
索引时间类型源事件ID消息
----- ---- ---- ------ ------- -------
2 Sep 18 12:50 Info yaddayadda 0分类: Controllers.BasketController ...
1 Sep 18 12:50 Info yaddayadda 0类:Controllers.BasketController ...
有可能看到完整的消息吗?
Ric*_*ard 19
您将看到该类型的默认表格式(这将在其中一个安装(x.format.ps1.xml文件)中定义).
您可以:
format-table -wrap到管道的末尾,PSH将包装最终列的文本.format-table -auto到管道的末尾,PSH将调整所有列以适应(但需要首先查看所有数据,因此您不会获得增量结果).-auto和-wrap.help format-table -full请见.Yoo*_*kim 10
除了上面提出的方法之外,-ExpandProperty如果您只想提取错误消息,可以使用以下内容:
Get-EventLog -LogName Application -Newest 10 -EntryType Warning | select -ExpandProperty message
Run Code Online (Sandbox Code Playgroud)
这将提取整个错误消息.
| 归档时间: |
|
| 查看次数: |
30102 次 |
| 最近记录: |