天天看点

Sharepoint MOSS stsadm常用命令汇总

 stsadm路径:

cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

备份还原网站

以下是代码片段:

    stsadm -o backup -url http://spweb/sites/fdp -filename C:\fdp_0216.bak -overwrite 

stsadm -o restore -url http://spweb/sites/fdp -filename D:\BACKUP\fdp_0216.bak -overwrite

  导入导出备份

    stsadm -o import -url http://portalsuat/smspindia/bi -filename c:\smspindia-bi.cab -includeusersecurity -haltonfatalerror 

stsadm -o export -url http://simoss/sites/gns/circuits -filename d:\backups\GNSCircuit\gnscircuit20090207.bak -includeusersecurity -haltonfatalerror

  添加删除数据库

    stsadm -o preparetomove -contentdb SIMOSSSHOWSQL01:WSS_Content_SIDEVVM02 -site http://sidevvm02 

stsadm -o deletecontentdb -url http://sidevvm02 -databasename WSS_Content_SIDEVVM02 

stsadm -o addcontentdb -url http://sidevvm02 -databasename WSS_Content_SIDEVVM02

  命令行修改密码

    cd %commonprogramfiles%\Microsoft Shared\Web server extensions\12\Bin 

stsadm -o updatefarmcredentials -userlogin REDMOND\sicfgact -password Feb19Upd@t 

iisreset /noforce 

stsadm -o updateaccountpassword -userlogin REDMOND\sicfgact -password Feb19Upd@t -noadmin 

stsadm.exe -o spsearch -farmserviceaccount REDMOND\sicfgact -farmservicepassword Feb19Upd@t 

stsadm.exe -o spsearch -farmcontentaccessaccount REDMOND\sicfgact -farmcontentaccesspassword Feb19Upd@t 

stsadm.exe -o editssp -title SharedServices1 -ssplogin REDMOND\sicfgact -ssppassword Feb19Upd@t 

stsadm.exe -o osearch -farmserviceaccount REDMOND\sicfgact -farmservicepassword Feb19Upd@t

  锁定网站

    stsadm -o getsitelock -url http://sdt-help/personal/test 

stsadm -o setsitelock -url http://sdt-help/personal/test -lock readonly

  修复数据库

    stsadm -o databaserepair -url http://portalsuat/smspindia/bi -databasename WSS_Content_PORTALSUAT02c 

stsadm -o databaserepair -url http://portalsuat/smspindia/bi -databasename WSS_Content_PORTALSUAT02b -deletecorruption

  删除网站

stsadm -o deletesite -url http://portalsuat/smspindia/bi

  转移所在数据库

    Stsadm -o enumsites -url http://portalsuat > C:\SYSTEM_LOG\2009-03-26\sites.xml 

Stsadm -o mergecontentdbs -url http://portalsuat -sourcedatabasename WSS_Content_PORTALSUAT02b -destinationdatabasename WSS_Content_PORTALSUAT02c -operation 3 -filename C:\SYSTEM_LOG\2009-03-26\sites.xml 

iisreset /noforce

  升级sharepoint 6332

stsadm -o preparetomove -contentdb SIMOSSSHOWSQL01:WSS_Content_SIDEVVM02 -site http://sidevvm02 

net start spadmin 

net start sptimerv3 

psconfig -cmd upgrade -inplace b2b -force 

  安装激活feature

    stsadm -o installfeature -filename [feature文件夹下]\feature.xml 

stsadm -o activatefeature -filename [feature文件夹下]\feature.xml -url http://[计算机名]:[端口]/sites/portol -force

引用地址: 

<a href="http://www.cnblogs.com/jecoso/archive/2008/05/25/1206878.html">http://www.cnblogs.com/jecoso/archive/2008/05/25/1206878.html</a>

Start or stop a full crawl

To start a full crawl of the content, use the following syntax:

<b>开始</b>

<b>Stsadm -o spsearch -action fullcrawlstart</b>

To stop a full crawl of the content, use the following syntax:

<b>停止</b>

<b>Stsadm -o spsearch -action fullcrawlstop</b>

需要注意的是,这里所说的是停止或者启动爬网而不是搜索服务。

本文转自    yuxye   51CTO博客,原文链接:http://blog.51cto.com/fishvsfrog/744711