常用的stsadm命令行参数有:

1、installfeature、uninstallfeature:

feature部署和卸载; 安装feature:stsadm -o installfeature -filename [feature文件夹下]\feature.xml

激活feature:stsadm -o activatefeature -filename [feature路径]\feature.xml -url http://[主机标头]:[端口]/sites/portol -force

特别注意的地方 -url     

还有就是:“主机标头”可以不是计算机名,但是有时创建Web Application时会出错,所以还是用计算机名比较好。也不知到为什么会出错。

2、addwppack、deletewppack:webpart和*.cab部署和卸载;

安装:stsadm -o addwppack -filename [*.cab文件路径]\*.cab

卸载:stsadm -o deletewppack -name *.cab

一般情况下,webpart不要直接部署到网站里,用feature部署要好一些。

3、addtemplate、deleteremplate:template(模板)的部署和卸载;

安装:stsadm.exe -o addtemplate -filename [*.stp文件路径]\*.stp -title [template名称]

4、addsolution、deletesolution:

solution部署和卸载;

安装:stsadm -o addsolution -filename [*.wsp文件路径]\*.wsp;

部署:stsadm -o deploysolution -name *.wsp -allowgacdeployment -immediate

删除:stsadm.exe -o deletesolution -name *.wsp

Feature功能很强大,很多东西都可以通过feature部署到MOSS里,但是根据自己的使用情况,

个人感觉母板页(MasterPage)和模板(template)还是通过“母板页库”和“模板库”上传上去比较好用。

5、getlock、setlock:

用于在备份backup site collection时访问限制;

  1. At a command prompt on the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.

  2. To determine the current access level of the site, type the following command, and then press ENTER:

    stsadm -o getsitelock -url <URL name>

    where URL name is the URL of the site collection that you want to back up. For more information, see Getsitelock: Stsadm operation (Office SharePoint Server).

  3. If the current access level allows changes to the site content, change it to read-only by typing the following command, and then pressing ENTER:

    stsadm -o setsitelock -url <URL name> -lock readonly

    where URL name is the URL of the site collection that you want to back up. For more information, see Setsitelock: Stsadm operation (Office SharePoint Server).

  4. When the backup is complete, use this procedure to return access to the site collection to the original setting determined in step 1.

Use this procedure to back up a site collection by using the Stsadm command-line tool.

Examples

A common situation where the getsitelock and setsitelock operations are useful is when a site is backed up. Typically, before you back up a site collection, the site should be locked and no users should have access to it.

To determine the lock status of the site, you can use the following getsitelock syntax:

stsadm -o getsitelock -url http://server_name

Once the lock status of the site collection is determined, you can use the noaccess parameter of the setsitelock operation to lock out all users to the site:

stsadm -o setsitelock -url http://server_name -lock noaccess

You can use the Backup operation to create a backup of the site collection:

stsadm -o backup -url http://server_name -filename "filename.bak" -overwrite

After the site has been backed up, you can use the none parameter of the setsitelock operation to remove all locks to the site:

stsadm -o setsitelock -url http://server_name -lock none

转载于:https://www.cnblogs.com/jhobo/archive/2008/12/08/1350580.html

常用的stsadm命令行参数相关推荐

  1. Android开发实践:常用NDK命令行参数

    Android提供了NDK工具,用来编译native代码(c/c++),该工具配置好了相关的交叉编译环境和工具链,只需要你简单地编写几个.mk文件即可将你的c/c++代码编译为Android的java ...

  2. gcc 编译器常用的命令行参数一览

    这些常用的 gcc/g++ 命令行参数,你都知道么? 1. gcc -E source_file.c -E,只执行到预编译.直接输出预编译结果. 2. gcc -S source_file.c  -S ...

  3. laravel auth(api)-attempt 返回false_3分钟短文:Laravel命令行参数和可选项分不清?怎么可能...

    引言 上一期我们介绍了laravel命令行的创建,以及使用方法.使用了一个没有数据输入和输出的测试用例. 本期我们来介绍带有命令行参数输入,和命令行输出信息的代码用法. 代码时间 声明命令行位置参数, ...

  4. 编程模板-R语言脚本写作:最简单的统计与绘图,包安装、命令行参数解析、文件读取、表格和矢量图输出

    写在前面 个人认为:是否能熟悉使用Shell(项目流程搭建)+R(数据统计与可视化)+Perl/Python等(胶水语言,数据格式转换,软件间衔接)三门语言是一位合格生物信息工程师的标准. 之前分享过 ...

  5. Python中最好用的命令行参数解析工具

    Python 做为一个脚本语言,可以很方便地写各种工具.当你在服务端要运行一个工具或服务时,输入参数似乎是一种硬需(当然你也可以通过配置文件来实现). 如果要以命令行执行,那你需要解析一个命令行参数解 ...

  6. 如何将命令行参数传递给Node.js程序?

    我有一个用Node.js编写的Web服务器,我想使用一个特定的文件夹启动. 我不确定如何在JavaScript中访问参数. 我正在像这样运行节点: $ node server.js folder 这是 ...

  7. python argvparser_Python命令行参数argv和argparse该如何使用

    概述 运行python脚本时通过命令行方式传入运行参数通常有以下两种自建方式: sys.argv - 简洁 argparse - 丰富,可自定义 下面详细说一下具体时使用 argv # test_ar ...

  8. python 命令行参数-Python处理命令行参数

    1. 将命令行参数保存在列表中,注意argv[0]是程序本身的名字: import sys print(sys.argv) print(sys.argv[1]) python argv.py loca ...

  9. python 命令行参数-python获取命令行参数的方法(汇总)

    介绍python获取命令行参数的方法:getopt模和argparse模块. python版本:2.7 一.getopt模块 主要用到了模块中的函数: options, args = getopt.g ...

最新文章

  1. hdu 携程全球数据中心建设 (球面距离 + 最小生成树)
  2. BringWindowToTop(), SetForegroundWindow(), SetActiveWindow()
  3. 已知圆心 坐标和一点坐标和角度 就之后的坐标_《6. AutoCAD 标注角度尺寸》
  4. C++ Primer中文版(第4版 特别版)
  5. linux gdb 脚本,如何写gdb命令脚本
  6. 【翻译】在backtrack5上用Evilgrade工具15步**windows
  7. 背景半透明(HTML、CSS)
  8. Wannafly 每日一题 2016-12-26 KAOS 字典树
  9. 阿里云原生资深专家李国强:云原生上云概述
  10. 最新区块链开发教程汇总
  11. 关于新手做ASO的一些方法和技巧
  12. TortoiseGit拉取gitee代码
  13. 英文原文:6 Life Habits That Programming Could Teach You Today
  14. 3D数学基础——Rotator类的C++实现
  15. C语言算法题:简单密码
  16. tomcat宕机自动重启和每日定时启动tomcat
  17. Tableau、PowerBI、OBIEE、QuickBI的比较
  18. Postman上传文件测试
  19. 关于《火影忍者 博人传》的一点想法
  20. php审计思路,PHP代码审计实战思路浅析

热门文章

  1. MCU实战经验:多种的按键处理
  2. 运算放大器的好坏判别方法
  3. python django开发问题
  4. AppDynamics把业务交易跟踪扩展到SAP环境
  5. (转)自动化管理工具Saltstack之nginx部署
  6. 如何用css让一个容器水平垂直居中
  7. jq判断滚动条向上还是向下
  8. C#和nodejs的互操作
  9. android开发设置dialog的高宽
  10. 【转载】SQL中使用update inner join和delete inner join