document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # code from http://aperturescience.su
  2.  
  3. # import the modile
  4. Import-Module .\\Web-Actions.psm1
  5. # download process explorer, perform dir to see if file is there
  6. Get-WebFile "http://live.sysinternals.com/procexp.exe"
  7. dir
  8. # try the download again, an exception should be thrown
  9. Get-WebFile "http://live.sysinternals.com/procexp.exe"
  10. # This time, download the file again with the clobber switch, dir to confirm file is updated
  11. Get-WebFile "http://live.sysinternals.com/procexp.exe" -Clobber
  12. dir
  13. # download procexp with a new filename. Dir to confirm.
  14. Get-WebFile "http://live.sysinternals.com/procexp.exe" -Filename "pants.exe"
  15. dir
  16. # Download FireFox from an FTP server
  17. Get-WebFile "ftp://mirror.aarnet.edu.au/pub/mozilla/firefox/releases/latest/win32/en-US/Firefox%20Setup%2018.0.1.exe"
  18. dir
  19. # Download from a Windows File share
  20. get-webfile "\\\\myserver\\folder\\file.exe"
  21. dir
  22.  
  23. # code from http://aperturescience.su
');