Fix hostname variable when disabling Windows Defender

This commit is contained in:
Filippo Anarratone
2018-02-10 14:46:26 +00:00
parent 349ee4f76d
commit e389b3f97e
2 changed files with 2 additions and 2 deletions

View File

@@ -20,8 +20,9 @@ apm install language-batch
apm install language-docker
# Disable Windows Defender realtime scanning before downloading Mimikatz
If ($hostname -eq "win10") {
If ($env:computername -eq "WIN10") {
set-MpPreference -DisableRealtimeMonitoring $true
Set-MpPreference -ExclusionPath C:\commander.exe, C:\Tools
}
# Purpose: Downloads and unzips a copy of the latest Mimikatz trunk