This file contains hidden or 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
| // Only generate ticket at beginning of quarter. | |
| function IsStartOfQuarter() { | |
| let result = false; | |
| const now = new GlideDateTime(); | |
| const month = now.getMonth(); | |
| if (month == 1 || month == 4 || month == 7 || month == 10) { | |
| result = true; | |
| } | |
| return result; |
This file contains hidden or 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
| Get-WinEvent -LogName Microsoft-Windows-DNS-Client/Operational -MaxEvents 100 # | where { $_.ID -gt 1010 } | |
| # Enable a non-default Windows log | |
| $logName = "Microsoft-Windows-DNS-Client/Operational" | |
| Get-WinEvent -ListLog $logName | Format-List Is* | |
| $log = New-Object System.Diagnostics.Eventing.Reader.EventLogConfiguration $logName | |
| $log.IsEnabled = $true | |
| $log.MaximumSizeInBytes = 104857600 # 100 MB | |
| $log.SaveChanges() | |
| Get-WinEvent -ListLog $logName | Format-List Is* |