I want to audit file object access on Windows Server 2012 R2. Object access auditing is enabled in local policy and for the directories I am interested in. I can see the proper logs in Security log ...

Question: How to write an event log entry with structured XML data using PowerShell?
My PowerShell script writes to the Windows event log using the Write-EventLog cmdlet. Currently I use the -Message ...

Dim Searcher As New ManagementObjectSearcher("root\CIMV2", "SELECT * FROM Win32_NTLogEvent Where Logfile='Application' and RecordNumber='21895'") '
' get the query collection
Dim queryCollection As ...

I had been entrusted with a task of my application failing intermittently on a Windows 2012 R2 Box with a network attached file server with the application code. The failure is typical
(14d4.1194): ...

We are developing an application that consumes events from the Windows Event Log, and would like a mechanism to read in some saved events (e.g. from an evtx file) and re-write the "same" events to the ...

Is there a way to pull the most recent 3 error events from the System event log using Get-WMIObject and the win32_ntlogevent class?
$log = Get-WMIobject -ComputerName $server -Credential $cred -class ...

I'm using ElasticSearch / Logstash / Kibana to centralize my logs.
On the servers I'm running NXlog to send eventlogs. It's been running fine for a couple of days, but while troubleshooting something ...

I am trying to write to the eventlog and although the message I enter is successfully added to the log, I get the following error:
the message resource is present but the message is not found in the ...

Problem Context
My application needs to look at some entries in the EventLog whenever a new entry is written to the Application log, in order to check if the originated with a specific application.
...

Let's say that I have a long-running thread (A daemon or a service) and I don't want to unnecessarily accumulate memory, and I want to use the EventLog.
I have code similar to:
EventLog myEventLog = ...

While creating a project using Windows Service VS2013 project template i noticed that after add an EventLog component from the tools box the #region named "Component Designer generated code" is filled ...

I've written an application, a component of which watches for Events being raised in the Windows Application Log with a certain Source and EventID in order to parse data from them. However, it appears ...

It's a simple question. I know the information is there somewhere. I've been hammering away with Powershell for 3 days and getting close. I'm runnin' out of time to be honest.
Here's the situation. ...

I'm willing to export a custom view from my Event Viewer into an XML format file. It is easy using the interface: "Save current custom view as .." , but I can't find how to do this using the command ...

I am trying to use Powershell to pull system event logs for a specific set of event IDs (including shutdown and start events) for the past week while excluding a specific window of time each day which ...

I have been searching for ages to find a way to create a number of separate event logs under a sub directory of Applications and Services Logs, in the same way that there is a Sub directory Microsoft ...

I would like to create a script in powershell that will write to the event log when I unplug or plug in my laptop. How can I listen for this kind of event?
Powershell Script
The script given in the ...

I have a simple program designed to send Event Logs when used. I managed to get most of the event logs out of the system, but there are some that throw an Exception (EventLogException : {"The system ...

The first command creates an entry in the event log, it seems to be working because I can see the message data in event viewer. The issue is when reading it back from powershell the message field is ...

Update 2: I ended up figuring this out while writing it. I figured I'd post it for anyone else muddling through. See sub-heading 'Resolution - Get only default properties', or the answer. Please feel ...

I have two windows services that are the same almost (with some differences in the code)i have installed the first one and it added a windows log source called 'A' and want to proceed to install the ...