PowerShell script that uses Invoke-WebRequest
, and Start-BitsTransfer
commands to recursively download files
Provide a barebones Powershell script tested on the following version:
Major | Minor | Build | Revision |
---|---|---|---|
5 | 1 | 17134 | 858 |
If you are in a locked down environment, and you can't install any vastly superior tools, then this script will at least let you mirror a website.
-
Open Powershell and create the directory to store the module in
New-Item -ItemType Directory -Force -Path $env:UserPROFILE\Documents\WindowsPowerShell\Modules\SyncWebsite
-
Download the SyncWebsite.psm1 module and save the module to the previously created directory
Import-Module SyncWebsite
Sync-Website -url https://example.com/packages -dest .\downloadDir -proxy 'http://XX.XX.X.XXX:443'
I will initially only add features that meet my bare minimum needs. If you want a feature implemented, please create an issue and I will happily add it.