bunch of fixes and updates

This commit is contained in:
2021-06-02 16:16:24 -04:00
parent 9c45e6c8b6
commit 08fb567460
7 changed files with 28 additions and 11 deletions
+2 -2
View File
@@ -443,8 +443,8 @@ function Toggle-Log {
)
Try {
$log = New-Object System.Diagnostics.Eventing.Reader.EventLogConfiguration $Name
If ( $Enable ) { $log.IsEnabled = $true }
If ( $Disable ) { $log.IsEnabled = $false }
If ( $Enable ) { LogMsg "Enabing ${Name} event log" ; $log.IsEnabled = $true }
If ( $Disable ) { LogMsg "Disabing ${Name} event log" ; $log.IsEnabled = $false }
$log.SaveChanges()
}
Catch { LogMsg $_.Exception.Message }