# code from http://aperturescience.su
# import the modile
Import-Module .\\Web-Actions.psm1
# download process explorer, perform dir to see if file is there
Get-WebFile "http://live.sysinternals.com/procexp.exe"
dir
# try the download again, an exception should be thrown
Get-WebFile "http://live.sysinternals.com/procexp.exe"
# This time, download the file again with the clobber switch, dir to confirm file is updated
Get-WebFile "http://live.sysinternals.com/procexp.exe" -Clobber
dir
# download procexp with a new filename. Dir to confirm.
Get-WebFile "http://live.sysinternals.com/procexp.exe" -Filename "pants.exe"
dir
# Download FireFox from an FTP server
Get-WebFile "ftp://mirror.aarnet.edu.au/pub/mozilla/firefox/releases/latest/win32/en-US/Firefox%20Setup%2018.0.1.exe"
dir
# Download from a Windows File share
get-webfile "\\\\myserver\\folder\\file.exe"
dir
# code from http://aperturescience.su