天天看點

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