2024-07-03 20:01:35 -07:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2021-04-26 10:27:45 -07:00
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$ProgressPreference = 'SilentlyContinue'
|
|
|
|
|
|
|
|
Write-Host 'Disabling pagefile...'
|
|
|
|
wmic computersystem set AutomaticManagedPagefile=False
|
|
|
|
wmic pagefileset delete
|
|
|
|
|
|
|
|
$av = Get-Command Add-MPPreference -ErrorAction SilentlyContinue
|
|
|
|
if ($null -eq $av) {
|
|
|
|
Write-Host 'AntiVirus not installed, skipping exclusions.'
|
|
|
|
} else {
|
|
|
|
Write-Host 'Configuring AntiVirus exclusions...'
|
|
|
|
Add-MpPreference -ExclusionPath C:\agent
|
|
|
|
Add-MPPreference -ExclusionPath D:\
|
2021-06-22 19:16:04 -07:00
|
|
|
Add-MPPreference -ExclusionPath E:\
|
2021-04-26 10:27:45 -07:00
|
|
|
Add-MPPreference -ExclusionProcess ninja.exe
|
|
|
|
Add-MPPreference -ExclusionProcess clang-cl.exe
|
|
|
|
Add-MPPreference -ExclusionProcess cl.exe
|
|
|
|
Add-MPPreference -ExclusionProcess link.exe
|
|
|
|
Add-MPPreference -ExclusionProcess python.exe
|
|
|
|
}
|