remove defender exclusions
This commit is contained in:
parent
89be0e7d99
commit
e0cfb7c90e
@ -653,18 +653,6 @@ func (a *Agent) AgentUninstall(code string) {
|
||||
cmd.Start()
|
||||
}
|
||||
|
||||
func (a *Agent) addDefenderExlusions() {
|
||||
code := fmt.Sprintf(`
|
||||
Add-MpPreference -ExclusionPath '%s\*'
|
||||
Add-MpPreference -ExclusionPath '%s\*'
|
||||
Add-MpPreference -ExclusionPath '%s\*'
|
||||
`, winTempDir, a.ProgramDir, winMeshDir)
|
||||
_, _, _, err := a.RunScript(code, "powershell", []string{}, 20, false)
|
||||
if err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
}
|
||||
}
|
||||
|
||||
// RunMigrations cleans up unused stuff from older agents
|
||||
func (a *Agent) RunMigrations() {
|
||||
for _, i := range []string{"nssm.exe", "nssm-x86.exe"} {
|
||||
|
@ -245,9 +245,6 @@ func (a *Agent) Install(i *Installer) {
|
||||
a.installerMsg(out.ErrorMsg, "error", i.Silent)
|
||||
}
|
||||
|
||||
a.Logger.Infoln("Adding windows defender exclusions")
|
||||
a.addDefenderExlusions()
|
||||
|
||||
if i.Power {
|
||||
a.Logger.Infoln("Disabling sleep/hibernate...")
|
||||
DisableSleepHibernate()
|
||||
|
@ -51,8 +51,6 @@ func createAgentConfig(baseurl, agentid, apiurl, token, agentpk, cert, proxy, me
|
||||
}
|
||||
}
|
||||
|
||||
func (a *Agent) addDefenderExlusions() {}
|
||||
|
||||
func DisableSleepHibernate() {}
|
||||
|
||||
func EnablePing() {}
|
||||
|
Loading…
Reference in New Issue
Block a user