2
I have been using the following command to pull back files from a web server and store them on my local machine:
$client = New-Object System.Net.WebClient
$client.DownloadFile('http://www.example.com/style/test.php','C:\Users\Me\Documents\style.css')
Is there a way of modifying this to pull back a whole directory? This is my first time using Powershell and the only other exposure I've had to anything like this is wget in Linux.
Any help would be greatly appreciated.
Is this your website? Since I assume you have permission, use an FTP program... Otherwise you'll need to query the server to get the list of files, and then iterate through. Seems odd though to use Powershell – Dave – 2015-08-27T13:14:11.613
https://blogs.technet.microsoft.com/heyscriptingguy/2012/08/17/use-powershell-3-0-to-easily-download-60-spanned-files/ – Ashish Singh – 2016-10-20T06:19:02.683