Azure OMS Step by Step – Log Collection Setup

In this video I give a step by step overview of how to setup log collection for Azure OMS Log Analytics.  I include setting up log collection for Azure and non-Azure Virtual Machines.

Click here for more information on setting up an OMS Workspace.

Continue reading “Azure OMS Step by Step – Log Collection Setup”

Link Azure Automation and OMS Workspace

I had issues linking a Log Analytics Workspace and Automation Account this week.  To begin with, there is no option to link an Automation Account from within an OMS Workspace and no way to link an OMS Workspace from within the Automation Account.  The only option is to go into the OMS Workspace and add a solution that requires an Automation Account such as Automation and Control.  The process is outlined here.

Updated 11/2018 – Added Log Analytics to the content as OMS is getting phased out.
Issue below still exists, although you do not need to go into the OMS portal to link.  It can be done simply by added the Automation and Control solution in Azure.  The Log Analytics Workspace and Automation Account do not need to be in the same Resource Group.  They do need to be in the East US and East US 2 Region to link however.

The bigger problem is that when I went to configure the workspace there was no Automation Account available when I tire to add a solution.  OMS Gave me the message: Continue reading “Link Azure Automation and OMS Workspace”

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”