mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 10:28:00 +08:00
Move "Run-Antivirus" step outside of image-generation (#574)
* Move "Run-Antivirus" step outside of image-generation Co-authored-by: Dibir Magomedsaygitov <v-dimago@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
0c0f68b26c
commit
9b3924a23d
@@ -1,19 +0,0 @@
|
||||
################################################################################
|
||||
## File: Run-Antivirus.ps1
|
||||
## Desc: Run a full antivirus scan.
|
||||
## Run right after cleanup before we sysprep
|
||||
################################################################################
|
||||
|
||||
Write-Host "Run antivirus"
|
||||
Push-Location "C:\Program Files\Windows Defender"
|
||||
|
||||
# Tell Defender to use 100% of the CPU during the scan
|
||||
Set-MpPreference -ScanAvgCPULoadFactor 100
|
||||
|
||||
# Full Scan
|
||||
.\MpCmdRun.exe -Scan -ScanType 2
|
||||
Pop-Location
|
||||
|
||||
Write-Host "Set antivirus parmeters"
|
||||
Set-MpPreference -ScanAvgCPULoadFactor 5 `
|
||||
-ExclusionPath "D:\", "C:\"
|
||||
Reference in New Issue
Block a user