mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #98705 from mcshooter/master
Disable sample submission and MAPS Reporting from Windows Defender
This commit is contained in:
commit
85ea0dca78
@ -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