Inital commit.

This commit is contained in:
2019-11-11 19:22:39 -05:00
parent f89d330f14
commit a052b43b22
80 changed files with 5989 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Function to enable or disable a specified log
function SetLog
{
param (
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true, ParameterSetName = 'Enable')]
[switch]$Enable,
[Parameter(Mandatory = $true, ParameterSetName = 'Disable')]
[switch]$Disable
)
# Create a new object for the specified log
$log = New-Object System.Diagnostics.Eventing.Reader.EventLogConfiguration $Name
# Make the specified change to the log
if ( $Enable ) { $log.IsEnabled = $true }
if ( $Disable ) { $log.IsEnabled = $false }
# Commit changes to the log
$log.SaveChanges()
}
SetLog -Name Microsoft-Windows-DNS-Client/Operational -Disable