Вы можете попробовать это.
Function Download-File([string]$FileUrl,[string]$DownloadPath)
{
$fileName = [System.IO.Path]::GetFileName($FileUrl)
$downloadFilePath = [System.IO.Path]::Combine($DownloadPath,$fileName)
$client = New-Object System.Net.WebClient
$client.Credentials = new-object System.Net.NetworkCredential("lee", "password", "domain")
$client.DownloadFile($FileUrl, $downloadFilePath)
$client.Dispose()
}
Download-File -FileUrl http://sp:12001/MyDoc/test2.docx -DownloadPath "C:\Lee\PSDownLoad"