一般情况下对IT管理者来说,在SharePointFarm中维护Feature,更喜欢使用命令行实现,这样可以省去登录到具体站点的操作。比如IT接到enduser的一个需求,要开启SiteCollectionFeature,如果直接操作......
2023-01-12
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
相关文章
一般情况下对IT管理者来说,在SharePointFarm中维护Feature,更喜欢使用命令行实现,这样可以省去登录到具体站点的操作。比如IT接到enduser的一个需求,要开启SiteCollectionFeature,如果直接操作......
2023-01-12
我们经常会在SharePoint网站集的权限列表中看到某个user有LimitedAccessPermission,但是我们都知道或者试过,在SharePointsitecollection中没有办法直接添加user赋予LimitedAccess权限,并且LimitedAccess这个......
2023-01-12
在这样的场景下,比如统计员工的个人信息,IT会在SharePoint中新建list,加一些需要填写的栏位,然后让公司员工登录填写。这时候比起大家都能看到彼此信息而言,从公司角度更想让员工只能......
2023-01-12
大多数企业使用SharePoint文档库时,都会建议EndUser在编辑文档前先做CheckOut动作,这样可以保证文档在当前用户编辑过程中,其他人只能view而不能edit,防止多人同时修改同一文件互相影响的......
2023-01-12
为了记录SharePointLibrary/List中file/Item的修改情况,ITAdministrator会在List/Library的VersionSettings中开启Version管控设置。之后用户每次编辑item/file保存就会生成一个新的version记录,这样我们就会知道......
2023-01-12