Get-EventLog 參考 意見反應 模組: Microsoft.PowerShell.Management 取得本機電腦或遠端電腦上的事件記錄檔或事件記錄檔清單中的事件。 語法 PowerShell 複製 Get-EventLog [-LogName] <String> [-ComputerName <String[]>] [-Newest <Int32>] [-Af
Get-EventLog [-LogName] <String> [[-InstanceId] <Int64[]>] [-After <DateTime>] [-Before <DateTime>] [-ComputerName <String[]>] [-EntryType <String[]>] [-Index <Int32[]>] [-Message <String>] [-Newest <Int32>] [-Source <String[]>] [-UserName <String[]>] [<CommonParam...
| [-LogName] <String> |设定事件类型 |Get-EventLog System | | [-ComputerName <String[]>] |设定电脑名 |Get-EventLog System -ComputerName "localhost"| | [-Newest <Int32>] |设定取得最新事件件数 |Get-EventLog System -Newest 5 | | [-After <DateTime>] |设定取得指定日期之后的事件|Get-...
<datetime>:用于指定查询事件日志的时间范围。通过这两个 参数,可以获取在特定时间段内发生的事件。四、示例 以下是一些使用Get-EventLog命令的示例:1. 查询应用程序日志:powershell复制代码 Get-EventLog-LogName Application 此命令将显示应用程序日志中的所有事件。1. 查询安全日志中的最新10条事件:
Get-EventLog [-logName] <string> [-newest <int>] [<CommonParameters>] logname为日志名称 -newest为最新的前指定个日志数 Get-EventLog [-list] [-asString] [<CommonParameters>] get-eventlog有两种用法,一种是指出Logname后获得指定logname日志中的所有日志,如果你指定了newest参数,那么会返回你最新的前...
用命令行操作监视安全事件日志——用Windows PowerShell的Get-EventLog工具轻松查看安全事件日志 WINDOWS命令行工具事件日志安全操作松程序许多人使用LogParser之类的命令行工具查看Windows的日志,现在有了另一个工具,就是Windows PowerShell中的Get-Event-Log命令行程序(cmdlet).Windows IT Pro Magazine: 国际中文版...
Get-EventLogLevel Get-GlobalMonitoringOverride Get-HealthReport Get-MonitoringItemHelp Get-MonitoringItemIdentity Get-ServerComponentState Get-ServerHealth Get-ServerMonitoringOverride Get-ThrottlingPolicy Get-ThrottlingPolicyAssociation Invoke-MonitoringProbe ...
MediaSenseEventLog- 媒体感知事件日志 MldLevel- 多播侦听协议(MLD)级别 MldVersion- MLD版本 MulticastForwarding- 多播转发 GroupForwardedFragments- 群组转发分片 RandomizeIdentifiers- 随机化标识符 AddressMaskReply- 地址掩码回复 UseTemporaryAddresses- 使用临时地址 ...
管理员能够获取信息的主要来源是事件日志,PowerShell中有专门的Get-EventLog cmdlet处理事件日志。为了获取已存在的事件日志,需要使用-list参数以返回System.Diagnostics.EventLog类型的对象集合。获取这些对象后即可实现任何与系统日志相关联的操作,如下所示:
Get-EventLog"Windows PowerShell"|Sort-ObjectEventID |Group-ObjectEventID 若要查看所有经典事件日志,请键入: PowerShell Get-EventLog-List 还可以通过Get-WmiObjectcmdlet 来使用与事件相关的 Windows Management Instrumentation (WMI) 类,以检查事件日志。 例如,若要查看事件日志文件的所有属性,请键入: ...