bunch of fixes and updates
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user