mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Disable sample submission and MAPS Reporting from Windows Defender
Include logging when setting windows defender preferences Log Window Defender preferences to show configuration changes Move Defender configuration to be a part of Set-PrerequisiteOptions
This commit is contained in:
parent
81d8ccfa8e
commit
904f0b628b
@ -161,6 +161,20 @@ function Dump-DebugInfoToConsole {
|
|||||||
} Catch { }
|
} Catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Configures Window Defender preferences
|
||||||
|
function Configure-WindowsDefender {
|
||||||
|
if ((Get-WindowsFeature -Name 'Windows-Defender').Installed) {
|
||||||
|
Log-Output "Configuring Windows Defender preferences"
|
||||||
|
Set-MpPreference -SubmitSamplesConsent NeverSend
|
||||||
|
Log-Output "Disabling Windows Defender sample submission"
|
||||||
|
Set-MpPreference -MAPSReporting Disabled
|
||||||
|
Log-Output "Disabling Windows Defender Microsoft Active Protection Service Reporting"
|
||||||
|
|
||||||
|
Log-Output "Defender Preferences"
|
||||||
|
Get-MpPreference
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Converts the kube-env string in Yaml
|
# Converts the kube-env string in Yaml
|
||||||
#
|
#
|
||||||
# Returns: a PowerShell Hashtable object containing the key-value pairs from
|
# Returns: a PowerShell Hashtable object containing the key-value pairs from
|
||||||
@ -307,6 +321,8 @@ function Set-PrerequisiteOptions {
|
|||||||
# Use TLS 1.2: needed for Invoke-WebRequest downloads from github.com.
|
# Use TLS 1.2: needed for Invoke-WebRequest downloads from github.com.
|
||||||
[Net.ServicePointManager]::SecurityProtocol = `
|
[Net.ServicePointManager]::SecurityProtocol = `
|
||||||
[Net.SecurityProtocolType]::Tls12
|
[Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
|
Configure-WindowsDefender
|
||||||
}
|
}
|
||||||
|
|
||||||
# Creates directories where other functions in this module will read and write
|
# Creates directories where other functions in this module will read and write
|
||||||
|
Loading…
Reference in New Issue
Block a user