zoukankan      html  css  js  c++  java
  • SharePoint 网站管理-PowerShell

    1. 显示场中所有可用的网站集

    Get-SPSite

    2. 显示某一Web应用程序下可用的网站集

    Get-SPSite –WebApplication "SharePoint – 80"

    3. 显示某一内容数据库中可用的网站集

    Get-SPSite –ContentDatabase "WSS_CONTENT1"

    4. 获取指定的网站集

    $webApp = Get-SPSite -Identity http://sp2010

    5. 移除一个网站集

    使用变量:

    $siteCol = Get-SPSite -Identity "http://sp2010/sites/sitecol"
    Remove-SPSite $siteCol

    直接移除:

    Remove-SPSite –Identity http://sp2010/sites/sitecol

    6. 创建网站集

    New-SPSite –url http://sp2010/sites/sitecol -name Home
    -owneralias SPSiteAdmin -template STS#0

    7. 设置网站集的锁定状态

    Set-SPSite –Identity http://sp2010/sites/sitecol -LockState NoAdditions

    8. 设置网站集的存储限制

    Set-SPSite –Identity http://sp2010/sites/sitecol -MaxSize 1024
    -WarningSize 768

    9. 在网站集下创建一个网站

    New-SPWeb –url http://sp2010/sites/sitecol/newsubsite
    -name "New Sub Site" -template STS#0 –AddToTopNav –UniquePermissions
    -UseParentTopNav

    10. 显示某一个网站集下的所有子网站

    Get-SPWeb –Identity http://sp2010/sites/sitecol/*

    Get-SPWeb –Site http://sp2010/sites/sitecol

    11. 获取指定的网站

    $web = Get-SPWeb -Identity http://sp2010/sites/sitecol/subsite

    12. 从网站集中移除一个网站

    使用变量:

    $web = Get-SPWeb -Identity "http://sp2010/sites/sitecol/subsite"
    Remove-SPWeb $web

    直接移除:

    Remove-SPWeb –Identity http://sp2010/sites/sitecol/subsite

    13. 修改网站的URL

    Set-SPWeb –Identity "http://sp2010/sites/sitecol/newsubsite"
    –RelativeURL teamsites

    14. 移动网站集到另一个内容数据库

    Move-SPSite –Identity "http://sp2010/sites/sitecol"
    –DestinationDatabase "WSS_CONTENT_TEAMSITES"

    15. 将所有网站集从一个内容数据库移动到另一个内容数据库

    Get-SPSite –ContentDatabase "WSS_CONTENT_MAIN" | Move-SPSite
    –DestinationDatabase "WSS_CONTENT_TEAMSITES"
  • 相关阅读:
    SDUT 猴子分桃
    SDUT 母牛的故事
    SDUT 小鑫の日常系列故事(六)——奇遇记 递推算法
    SDUT 爬楼梯
    SDUT 王小二切饼
    linux 排序命令sort
    shell 判断语句
    shell统计指定范围内的所有质数以及它们的和
    shell 1到指定数累加
    shell九九乘法表
  • 原文地址:https://www.cnblogs.com/justinliu/p/5961723.html
Copyright © 2011-2022 走看看