Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( -not (Test-Path "$env:ProgramW6432\McAfee") -and -not(Test-Path "${env:ProgramFiles(x86)}\McAfee") ) { exit 0 }
- $OriginalDate = Get-Date
- # Set the date back to allow MFERemoval to run
- Set-Date -Date '01/01/2018'
- # Run removal tool
- Start-Process -FilePath "$PWD\MFERemoval100.exe" -ArgumentList '/noreboot','/q','/all','/force' -Wait
- # Revert the date
- Set-Date -Date $OriginalDate
- # Sync the time
- Start-Process -FilePath W32tm.exe -ArgumentList '/resync','/force' -Wait
- if ( -not (Test-Path "$env:ProgramW6432\McAfee") -and -not(Test-Path "${env:ProgramFiles(x86)}\McAfee") ) { exit 3010 }
- exit 1
Add Comment
Please, Sign In to add comment