我尝试使用PowerShell从SharePoint文档库下载文件,但我收到的错误是我不知道如何过去。
$localFileName1 = "E:\Temp\SOP-Cache\" + $pdfFileName;
$file = $streamSite.GetFile($pdfFileWithoutUrl);
$filebytes = $file.OpenBinary()
$action = [System.IO.FileMode]::Create
$filestream = New-Object System.IO.FileStream($localFileName1, $action)
$binarywriter = New-Object System.IO.BinaryWriter($filestream)
$binarywriter.write($filebytes)
$binarywriter.Close()
错误我收到:
发现"写"多个模糊的重载和参数计数: " 1"
我认为原因是因为$ binarywriter.write方法有多个重载,但我不确定如何继续。