Adding most Windows Event Logs to Log Analytics is a straightforward process. Simply go to the Advanced properties in the Workspace > Windows Event Logs and start typing the name. A pre-populated list will appear as shown below. Selected the log and add it for collection. But what if the log you are looking for is not listed in Log Analytics? Continue reading “Collect Custom Windows Event Logs in Log Analytics”
Tag: error
“NotFound” ARM Template Error
I recently ran into an issue while deploying a VM with an ARM template. The server deployed correctly, but the JoinDomain extension failed with the error below: Continue reading ““NotFound” ARM Template Error”
Writing to the Windows Event Log with PowerShell
Odds are, you were Googling something like ‘write event log PowerShell’ and you stumbled on this page. If that’s the case and you just want to write an event to the Event Log to test something like a monitoring or alerting app, I won’t disappoint, below is what you need to know. If you want a little more information on writing to the Event Log as part of a script, keep going.
Write-eventlog requires 4 parameters, EventID, LogName, Message and Source. It’s the -Source part that trip people up. If you don’t know what the source is, simply make one up. Create the new source with the New-Eventlog command like this:
New-EventLog -LogName <Log you are writing to> -Source ‘Make one up’
For example, Adding the source HAL to the application log looks like this:
New-EventLog -LogName Application -Source ‘HAL’
Continue reading “Writing to the Windows Event Log with PowerShell”
Server 2012 R2 and .NET 3.5
Microsoft decided not to add the .NET 3.5 install bits to Server 2012 R2 for some reason. Maybe they were nostalgic for the old days of hunting for install media? Anyway, if you have had the pleasure of trying to add .NET 3.5 to Server 2012 R2 you have probably seen the error “Do you need to specify an alternate source path? One or more installation selections are missing source files on the destination.” Continue reading “Server 2012 R2 and .NET 3.5”