STSADM/PowerShell Commands

List

stsadm –o gl-exportlistitem -url "http://intranet/sitedirectory/siteslist/AllItems.aspx" -id "1,2,3" -filename "c:\SiteDirItems" -includeusersecurity -versions 4 –nofilecompression

stsadm –o gl-importlistitem -url "http://teamsites/sitedirectory/siteslist/allitems.aspx" -filename "c:\SiteDirItems" -includeusersecurity -updateversions 2 -nofilecompression -retargetlinks -sourceurl http://intranet/sitedirectory/siteslist/AllItems.aspx

stsadm –o gl-copylistitem -sourceurl "http://intranet/sitedirectory/siteslist/AllItems.aspx" -targeturl "http://teamsites/sitedirectory/siteslist/allitems.aspx" -id "1,2,3" -includeusersecurity -updateversions 2 -versions 4 -nofilecompression -retargetlinks –deletesource

stsadm –o gl-deletelistitem -url "http://intranet/sitedirectory/siteslist/AllItems.aspx" -id "1,2,3"

stsadm –o gl-exportlist -url "http://intranet/Documents/Forms/AllItems.aspx" -filename "c:\docs" -includeusersecurity -versions 4 –nofilecompression

stsadm –o gl-importlist -url "http://teamsites/" -filename "c:\docs" -includeusersecurity -updateversions 2 -nofilecompression -retargetlinks -sourceurl "http://intranet/Documents/Forms/AllItems.aspx"

stsadm –o gl-copylist -sourceurl "http://intranet/Documents/Forms/AllItems.aspx" -targeturl "http://teamsites/" -includeusersecurity -updateversions 2 -versions 4 -retargetlinks

stsadm –o gl-getlistschemaxml -url "http://intranet/Documents/Forms/AllItems.aspx"

Sites/Webs

stsadm.exe -o export -url http://(Your Site) -includeusersecurity -nofilecompression -filename d:\spbackup

stsadm.exe -o import -url https://(Your Site) -includeusersecurity -nofilecompression -filename d:\spbackup

stsadm -o gl-movesite -url "http://intranet/sites/teamsite1" -moveto "http://teamsites/collaboration/teamsite1"

stsadm –o gl-moveweb -url "http://intranet/topics/divisions" -parenturl "http://intranet"

stsadm –o gl-moveweb -url "http://intranet/sites/projectATeamSite" -parenturl "http://teamsites/projects" -includeusersecurity –haltonfatalerror

stsadm –o gl-deleteweb2 -url "http://intranet/WebWithChildren" –recurse

Find it more here: http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s