[英]Can I use Office365 Powershell cmdlets to get Sharepoint Online groups and its member names?
[英]How to use powershell and the (S)SOM to upload files/directories into sharepoint 2013 in Office365?
我想启动一个新脚本,该脚本采用本地文件路径和文档库名称,然后抓取目录,并将找到的所有文件/文件夹上载到sharepoint 2014 Office 365文档库(服务器端对象模型)中{SOM})。
我尝试了以下方法,但没有成功:
我们的租户是可能的– office 365我们正在使用sharepoint 2013我们希望能够查看一个文件夹,并使用具有文件夹结构的所有文档,并通过powershell将结构和文件复制到我们的sharepoint租户。
您尝试使用的链接正在使用SharePoint服务器对象模型,该模型仅适用于SharePoint内部部署。 您需要SharePoint客户端对象模型才能与SharePoint Online一起使用。
Brendan Griffin在此处发布了有关使用客户端对象模型和PowerShell将文件上传到SharePoint Online文档库的文章: http : //blogs.technet.com/b/fromthefield/archive/2014/02/19/office365-script-对上载文件到一个使用文档库,-csom.aspx
这是PowerShell代码的关键部分,在ClientContext上设置了SharePoint Online凭据:
#Bind to site collection
$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User,$Password)
$Context.Credentials = $Creds
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.