zoukankan      html  css  js  c++  java
  • SharePoint的安装和配置-PowerShell

    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 <domainaccount>)
    -farmname <name of new farm>
    -passphrase (ConvertTo-SecureString -asplaintext -force -string "Enter a farm pass phrase here")

    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 SPAppPoolAccount -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 SPSiteAdmin
    -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
  • 相关阅读:
    iptbales未完全删除或禁用的问题
    一键部署安装
    python表单流式上传gzip格式文件代码
    was进行jvm配置和GC收集
    Nginx心跳检测
    Python简单本地加解密
    vmware克隆虚拟机并设置网络(vcenter6或5.5)
    python操作mongodb数据库
    vue props传值后watch事件未触发的问题
    docker实战之通过nginx镜像来部署静态页
  • 原文地址:https://www.cnblogs.com/justinliu/p/5961730.html
Copyright © 2011-2022 走看看