SharePoint PowerShell 启用站点的脚本功能
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.
SharePoint PowerShell 启用站点的脚本功能
前言
最近需要给站点开启自定义脚本功能,所以,搞了一下就有下面的博客,希望能给有需要的人,一些参考。
1.首先,需要下载和安装SharePoint Online Management Shell,安装就是下一步就行了:
Download SharePoint Online Management Shell from Official Microsoft Download Center
2.打开安装好的命令行工具,如下图:
3.可以使用PowerShell命令查看安装的命令行工具的版本,如下图:
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
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
5.使用命令启用脚本,如下图:
Set-SPOsite https://orgs.sharepoint.com/sites/DevSite -DenyAddAndCustomizePages 0
总结
以上,便是为SharePoint online站点开启自定义脚本的方式,有需要的可以看一下。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK