Removed_Content

Remote-Script-Fetcher.ps1

Feb 20th, 2026 (edited)
121
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.44 KB | Source Code | 0 0
  1. # Remote-Script-Fetcher.ps1
  2. # Downloads a script from a URL and saves it locally without executing it automatically.
  3. # Run it manually afterward with: powershell -ExecutionPolicy Bypass -File $path
  4.  
  5. $url = "https://example.com/myscript.ps1"
  6. $path = "$env:TEMP\myscript.ps1"
  7.  
  8. Invoke-WebRequest -Uri $url -OutFile $path
  9. Write-Host "Script downloaded to $path"
  10. Write-Host "To run it manually: powershell -ExecutionPolicy Bypass -File $path"
  11.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment