【发布时间】:2015-02-04 00:19:52
【问题描述】:
如果它尚不存在,我需要在 sharepoint 中创建一个文件夹。我的 powershell 脚本没有在 sharepoint 服务器上运行,所以我认为我必须使用 sharepoint Web 服务?我目前正在使用 webclient 将文件上传到带有 powershell 的共享点,如下所示 - 但我需要先为文件创建文件夹......如果它不存在;
# Upload the file
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = $credentials
$webclient.UploadFile($destination + "/" + $File.Name, "PUT", $File.FullName)
这可能与webclient有关吗?如果没有,如何使用 sharepoint Web 服务来完成?
【问题讨论】:
标签: powershell sharepoint sharepoint-2010