You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be great if I could use this resource to create new event logs and event sources.
For example today I would call New-EventLog like this to get this done:
### Create log and sourceNew-EventLog-LogName BigLog -Source TheHorsesMouth
I've ran into this problem as well and I'm working on a PR to add it.
While looking at using this as a basic layout for implementing it I've discovered a small problem:
The test block runs and find that the LogName doesn't exist (or it's sources don't match)
The set block runs and creates the LogName with the various sources specified
The test block runs again and can't find the LogName because it doesn't have any log entries in it.
So my current solution is that as part of the Set block it will write a log entry for each Source defined. This will populate the log to actually create it but also populate the Source entries allowing further Test blocks to run correctly.
Does anyone see any issues with this? Other than having a few spurious event log entries that might flag in monitoring solutions.
Would be great if I could use this resource to create new event logs and event sources.
For example today I would call New-EventLog like this to get this done:
My lame workaround is to use the Script resource:
The text was updated successfully, but these errors were encountered: