SharePoint Online 切换经典视图
SharePoint online 默认是现代视图,我们可以通过Powershell命令切换默认视图。
以下,是完成的Powershell命令:
# This file uses CSOM. Replace the paths below with the path to CSOM on this computer. # If CSOM is in the user's downloads folder, you only have to replace the <username> placeholder. Add-Type -Path "C:\Users\<username>\downloads\Microsoft.SharePointOnline.CSOM.16.1.5026.1200\lib\net45\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Users\<username>\downloads\Microsoft.SharePointOnline.CSOM.16.1.5026.1200\lib\net45\Microsoft.SharePoint.Client.Runtime.dll" # All strings in braces < >are placeholders that you must replace with the appropriate strings. $webUrl = 'https://<domain>.sharepoint.com/<relative-path-to-website>' $username = '<username>@<domain>.onmicrosoft.com' $password = Read-Host -Prompt "Password for $username" -AsSecureString [Microsoft.SharePoint.Client.ClientContext]$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl) $clientContext.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password) $site = $clientContext.Site; $customActions = $site.UserCustomActions $clientContext.Load($customActions) $clientContext.ExecuteQuery() $first = $true foreach($customAction in $customActions) { if($customAction.Location -eq "scriptlink" -and -Not ([string]::IsNullOrEmpty($customAction.ScriptBlock))) { if ($first) { Echo " " Echo ($webUrl + " has the following inline JavaScript custom actions") $first = $false } Echo $customAction.Title } }
如果保存ps1文件,请注意
Note: You can use a different file name, but you must save the file as an ANSI-encoded text file whose extension is .ps1
参考
https://support.office.com/en-us/article/Switch-the-default-experience-for-lists-or-document-libraries-from-new-or-classic-66dac24b-4177-4775-bf50-3d267318caa9
博文推荐: |
SharePoint 2013 WebPart 管理工具分享[开源] |
基于SharePoint 2013的论坛解决方案[开源] |
SharePoint 2013 学习基础系列入门教程 |
SharePoint 2013 图文开发系列之门教程 |
SharePoint Designer 学习系列入门教程 |
特:如果有SharePoint项目,欢迎邮件联系我,Email:linyu_s@163.com |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· 地球OL攻略 —— 某应届生求职总结