Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Remote-Script-Fetcher.ps1
- # Downloads a script from a URL and saves it locally without executing it automatically.
- # Run it manually afterward with: powershell -ExecutionPolicy Bypass -File $path
- $url = "https://example.com/myscript.ps1"
- $path = "$env:TEMP\myscript.ps1"
- Invoke-WebRequest -Uri $url -OutFile $path
- Write-Host "Script downloaded to $path"
- Write-Host "To run it manually: powershell -ExecutionPolicy Bypass -File $path"
Advertisement
Comments
-
Comment was deleted
-
- Downloads a script from a URL to a temp folder without auto-executing it, so you can review it before running it manually.
Add Comment
Please, Sign In to add comment