查询指定时间内审核失败的事件日志
2016-03-30 14:05
92 查看
查询指定时间内审核失败的事件日志,必须要加namespace,否则无返回
如果使用gwmi,时间格式还需要再次转换,无法直接使用。
Get-CimInstance需要PS3.0的支持。
$s = get-date "3/30/2016 13:54:03" $e = get-date "3/30/2016 13:55:03" $stime = [System.Management.ManagementDateTimeConverter]::ToDmtfDateTime($s) $etime = [System.Management.ManagementDateTimeConverter]::ToDmtfDateTime($e) Get-CimInstance Win32_NTLogEvent -namespace "root\cimv2" -filter "logfile='security' and type='审核失败' and TimeGenerated>='$stime' and TimeGenerated<='$etime'"
如果使用gwmi,时间格式还需要再次转换,无法直接使用。
Get-CimInstance需要PS3.0的支持。
相关文章推荐
- 【安装SQLserver2008R2 出现错误,临时类 result=1】
- UITextField - 文本框
- 数据归档方法
- 禁用Windows错误崩溃弹框提示方法
- 使用openssl中的加密函数AES、RC4、RSA对文件加密的一个例子
- GearVR开发之系列问题二——动态加载烘焙信息
- 腾讯2016在线模拟笔试
- 系统重温安卓
- 如何做一名优秀的博士生--施一公教授
- 与Python Falling In Love_Python跨台阶(面向对象)
- Warning: World-writable config file '/etc/my.cnf' is ignored
- mybatis抛出ORA-01745: 无效的主机/绑定变量名
- JavaScript split() 方法
- UEFI架构解读系列之EVENT
- Codeblocks 批量注释与对齐快捷键
- c++_union
- YTK的简单使用教程
- HDU 4786 Fibonacci Tree 最小生成树
- APICloud 集成支付宝 Ali64 错误,或用户取消操作
- 图像的降采样与升采样笔记