7

SharePoint PowerShell 启用站点的脚本功能

 3 years ago
source link: https://www.cnblogs.com/jianyus/p/14310388.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

SharePoint PowerShell 启用站点的脚本功能

  前言

  最近需要给站点开启自定义脚本功能,所以,搞了一下就有下面的博客,希望能给有需要的人,一些参考。

  1.首先,需要下载和安装SharePoint Online Management Shell,安装就是下一步就行了:

  Download SharePoint Online Management Shell from Official Microsoft Download Center

256729-20210121203727773-1213361916.png

  2.打开安装好的命令行工具,如下图:

256729-20210121203814422-1047656101.png

  3.可以使用PowerShell命令查看安装的命令行工具的版本,如下图:

Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

256729-20210121203958792-809284702.png

  4.连接SharePoint Online站点,如下图:

$adminUPN="[email protected]"
$orgName="orgs.onmicrosoft.com"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://orgs-admin.sharepoint.com -Credential $userCredential

256729-20210121205024751-1772582707.png

  5.使用命令启用脚本,如下图:

Set-SPOsite https://orgs.sharepoint.com/sites/DevSite -DenyAddAndCustomizePages 0

256729-20210121205223576-1053250600.png

  总结

  以上,便是为SharePoint online站点开启自定义脚本的方式,有需要的可以看一下。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK