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
Register-IcingaEventLog was introduced with Version 1.1.0 and allows us to write entries into the EventLog for debugging and general information. How ever, if being executed on the first time while run by a non-privileged user we run into an exception.
Expected Behavior
We should be able to run this from any user space, as we only register the application in the "Application" log and nowhere else
Current Behavior
The execution fails with the following error
Exception calling "SourceExists" with "1" argument(s): "The source was not found, but some or all event logs could notbe searched. Inaccessible logs: Security."
At C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\core\logging\Register-IcingaEventLog.psm1:3 char:5+$Registered= [System.Diagnostics.EventLog]::SourceExists(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SecurityException
New-EventLog : Access is denied. Try running the command again in a session that has been opened with elevated user
rights (that is, Run as Administrator).
At C:\Program
Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\core\logging\Register-IcingaEventLog.psm1:11 char:5+New-EventLog-LogName Application -Source 'Icinga for Windows';
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-EventLog], Exception
+ FullyQualifiedErrorId : AccessIsDenied,Microsoft.PowerShell.Commands.NewEventLogCommand
Possible Solution
Add handling to catch this issue
Steps to Reproduce (for bugs)
Install the Framework manually on a new system
Run any check from this system
The execution will fail with above mentioned error
The text was updated successfully, but these errors were encountered:
Register-IcingaEventLog
was introduced with Version 1.1.0 and allows us to write entries into the EventLog for debugging and general information. How ever, if being executed on the first time while run by a non-privileged user we run into an exception.Expected Behavior
We should be able to run this from any user space, as we only register the application in the "Application" log and nowhere else
Current Behavior
The execution fails with the following error
Possible Solution
Add handling to catch this issue
Steps to Reproduce (for bugs)
The text was updated successfully, but these errors were encountered: