1. 引入SPModule组件
Import-Module SPModule.misc Import-Module SPModule.setup
需要将执行策略修改为不限制
2. 无人值守安装SharePoint
Install-SharePoint –setupexepath D:\setup.exe –configxmlpath c:\config.xml
配置文件示例
<Configuration> <Package Id="sts"> <Setting Id="LAUNCHEDFROMSETUPSTS" Value="Yes" /> </Package> <Package Id="spswfe"> <Setting Id="SETUPCALLED" Value="1" /> </Package> <Logging Type="verbose" Path="%temp%" Template="SharePoint Server Setup(*).log" /> <!--<PIDKEY Value="Enter Product Key Here" />--> <Setting Id="SERVERROLE" Value="APPLICATION" /> <Setting Id="USINGUIINSTALLMODE" Value="1" /> <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL" /> <Setting Id="SETUP_REBOOT" Value="Never" /> </Configuration>
反注释PIDKEY,在Value属性处输入序列号
但是出于安全考虑,你可能不想把序列号存储在配置文件中,则可添加命令参数PIDKey
Install-SharePoint –setupexepath D:\setup.exe –configxmlpath c:\config.xml -PIDKey "ABDCE-FGHIJ-KLMNO-PQRST-UVWXY"
3. 配置一个新的SharePoint场
New-SharePointFarm -databaseserver <server name> -databaseaccessaccount (Get-Credential <domain\account>) -farmname <name of new farm> -passphrase (ConvertTo-SecureString -asplaintext -force -string "Enter a farm pass phrase here")
查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/
4. 添加一个服务器到SharePoint场
Join-SharePointFarm –databaseserver <database server name> -configurationdatabasename <config database> -passphrase (ConvertTo-SecureString -asplaintext -force -string "<farm pass phrase>")
5. 创建一个Web应用程序
New-SPWebApplication –applicationpool <name of new application pool> -name <name of new web app> -applicationpoolaccount <service account to be used for the application pool> -port <desired port number>
例如
New-SPWebApplication –applicationpool SharePoint-80 -name SharePoint-80 -applicationpoolaccount SP\AppPoolAccount -port 80
6. 创建一个网站集
New-SPSite –url <full url of new site collection> -name <name of new site collection> -owneralias <site collection administrator> -template <site collection template to use>
例如
New-SPSite –url http://sp2010/ -name Home -owneralias SP\SiteAdmin -template STS#0
网站模板名称可以通过Get-SPWebTemplates命令获得
7. 创建一个网站
New-SPWeb –url <full url of new site> -name <name of new site> -template <site template to use> -AddToTopNav(Optional) -UniquePermissions(Optional) -UseParentTopNav(Optional)
例如
New-SPWeb –url http://sp2010/PSSubSite -name "PS Sub Site" -template STS#0 –AddToTopNav –UniquePermissions -UseParentTopNav
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索sts
, template
, sharepoint
, 配置
, name
, 一个
Optional
,以便于您获取更多的相关知识。
时间: 2024-08-23 04:15:23