PowerShell cmdlets Related to event log
来源:互联网 发布:淘宝扫码让别人登录 编辑:程序博客网 时间:2024/05/16 14:22
The most commonly used cmdlets related to event logging are as follows:
Get-EventLog
Clear-EventLog
Show-EventLog
Limit-EventLog
Write-EventLog
New-EventLog
Remove-EventLog
clear the events from the Application event log using the -confirm switch:
Clear-EventLog -Logname "Application" -confirm
To see events of a remote server:
Show-EventLog -computername RemoteServerName
The following example shows all the sources available on the current host machine:
Get-EventLog -logname "Application" | Select-Object Source -unique
Write the message ‘‘SQL Server 2008 administration with Windows PowerShell’’ under the Application event log using the event source Userenv:
Write-EventLog -logname "Application" -source userenv -eventID 3001 -entrytype Information -message "SQL Server 2008 administration with Windows PowerShell" -category 1 -rawdata 10,20
The following command keeps the log entries for seven days and overwrites the log when it is overflowing:
Limit-EventLog -logname "Windows PowerShell" -overflowaction OverwriteOlder -retention 7
- PowerShell cmdlets Related to event log
- Use Windows PowerShell cmdlets to manage sites in SharePoint 2013
- 使用PowerShell获得Windows Event Log
- Accesing Metro via PowerShell-Appx Powershell Cmdlets
- Windows Azure PowerShell Cmdlets (2.2.2版)
- 在C#中调用Powershell Cmdlets
- PowerShell中的Json数据转换cmdlets
- 2.Using Windows PowerShell Cmdlets and 3.Leveraging PowerShell Providers
- How to find Domino installation related log files
- Professional Windows PowerShell Programming: Snapins, Cmdlets, Hosts and Providers
- Use PowerShell replace all cmdlets with alias automatically
- Problems Installing Windows Azure PowerShell Cmdlets 2.0 (Updaing)
- Clean Oracle related log file
- Write to the event log in a .net project
- Writing audit records to Windows Event Log failed
- ORA-28056: Writing audit records to Windows Event Log failed
- ora-28056 (Writing audit records to Windows Event Log failed)
- Writing audit records to Windows Event Log failed
- Android JNI 使用的数据结构JNINativeMethod详解
- linux 基础学习之五:shell脚本学习(2)——基本语法
- C宏定义【转】
- vxWorks嵌入式
- objective-C 中%@和%s
- PowerShell cmdlets Related to event log
- PClint配置VC6静态检查
- 保护眼睛的电脑设置
- vc开发某系统的总结
- configure
- DREAMWEAVER中消除代码中多余空行的方法
- 提取轮廓两种方法及绘制轮廓中最大等级分析
- 安卓记事本
- VS2010支持新的__VA_ARGS__宏定义