【发布时间】:2017-03-16 23:03:38
【问题描述】:
我正在尝试使用 Powershell 将文件上传和签入到 SharePoint Intranet 站点。此脚本将在远程计算机上运行,而不是在托管该站点的服务器上。在instructions given here 之后上传文件相对容易。
以下是我用来上传文件的一小部分过程。它们已成功上传,但仍检查给我。无论如何使用Powershell检查这些文件吗?
$destination = "http://mycompanysite.com/uploadhere/Docs”
$File = get-childitem “C:\Docs\stuff\To Upload.txt”
# Upload the file
$webclient = New-Object System.Net.WebClient
$webclient.UseDefaultCredentials = $true
$webclient.UploadFile($destination + "/" + $File.Name, "PUT", $File.FullName)
很遗憾,由于它是在远程计算机上运行的,因此无法使用 SharePoint PowerShell 模块。
谢谢!
【问题讨论】:
标签: powershell sharepoint sharepoint-2010