Last active
May 19, 2017 20:45
-
-
Save mapledyne/9d2899397e3c1163ae59c1ebc5839ecf to your computer and use it in GitHub Desktop.
Add new Windows event log source via Chef.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: You may want to change 'Application' in here, or make it more general, | |
# if you're wanting your data sources to be put somewhere else. | |
powershell_script 'Custom Event Log' do | |
code "new-eventlog -logname Application -source '#{name}'" | |
guard_interpreter :powershell_script | |
not_if "[System.Diagnostics.EventLog]::SourceExists('#{name}')" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment