Download URL content using PowerShell

后端 未结 7 1974
挽巷
挽巷 2020-12-25 15:33

I am working in a script, where I am able to browse the web content or the \'url\' but I am not able to copy the web content in it & download as a file. This is what I h

相关标签:
7条回答
  • 2020-12-25 16:03

    As already answered in https://stackoverflow.com/a/35202299/4636579, but with a mandatory Proxy and the credentials. Without proxy, it would be:

    $url="http://aaa.bbb.ccc.ffffd/rss.xml"
    
    $WebClient = New-Object net.webclient
    
    $path="C:\Users\hugo\xml\test.xml"
    
    $WebClient.DownloadFile($url, $path)
    
    0 讨论(0)
提交回复
热议问题