troubleshooting Question

Write-Eventlog in PowerShell does not write to the log

Avatar of Bob McCoy
Bob McCoyFlag for United States of America asked on
PowershellWindows OSWindows Server 2008
4 Comments1 Solution1290 ViewsLast Modified:
I had run "new-eventlog -log REI -source Status" to create a new event log on a server (Win 2008 R2).  I later decided to put my events in the Application log.  So I deleted the REI log from the EventVwr.msc.  And then entered "new-eventlog -log Application -source REI" to created the appropriate source.  The only problem is that "Write-EventLog -log Application -source REI -Id 1001 -Message "Test Message"" doesn't create an event I can see.

I created an additional source called FOO and it seems to work OK.  I can "Remove-Eventlog -Source REI" OK and trying to write to it indeed produces an error.  Add it back, OK; but no events show up.

There seems to be some artifact left around from the previous creation of the REI log.  I don't have this issue on other systems where I had not done that.

Looking for a clue as to what else might need to be cleaned up.
ASKER CERTIFIED SOLUTION
Subash Sundharan
IT Infrastructure Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros