zoukankan      html  css  js  c++  java
  • 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>downloadsMicrosoft.SharePointOnline.CSOM.16.1.5026.1200lib
    et45Microsoft.SharePoint.Client.dll"
    Add-Type -Path "C:Users<username>downloadsMicrosoft.SharePointOnline.CSOM.16.1.5026.1200lib
    et45Microsoft.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

  • 相关阅读:
    poj 2763 Housewife Wind
    hdu 3966 Aragorn's Story
    poj 1655 Balancing Act 求树的重心
    有上下界的网络流问题
    URAL 1277 Cops and Thieves 最小割 无向图点带权点连通度
    ZOJ 2532 Internship 网络流求关键边
    ZOJ 2760 How Many Shortest Path 最大流+floyd求最短路
    SGU 438 The Glorious Karlutka River =) 拆点+动态流+最大流
    怎么样仿写已知网址的网页?
    5-10 公路村村通 (30分)
  • 原文地址:https://www.cnblogs.com/jianyus/p/8390858.html
Copyright © 2011-2022 走看看