Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Downloads and runs the latest MS Safety Scanner (64-bit only)
- # Start edits
- # The full path for msert.exe
- $outputfile = 'D:\Portable Virus Scanners\msert.exe'
- # End edits
- $url = 'https://go.microsoft.com/fwlink/?LinkId=212732'
- $start_time = Get-Date
- Write-Host 'Downloading MS Safety Scanner, please wait..' -ForegroundColor Cyan
- Invoke-WebRequest -Uri $url -OutFile $outputfile -UseDefaultCredentials
- Write-Output "Time taken to download MS Safety Scanner: $((Get-Date).Subtract($start_time).Seconds) second(s)"
- # Run if it downloaded correctly
- if(Test-Path $outputfile)
- {
- Start-Process $outputfile
- }
Add Comment
Please, Sign In to add comment