在ps窗口输入下载链接,将文件下载到D盘 $url=read-host "下载链接" $arr = $url.Split("/") $len = $arr.Count "arr length: $len" $fileName = $arr[$arr.Count-1] powershell(new-object System.Net.WebClient).DownloadFile("$url","D:\$fileName")