Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm new to SharePoint 2010 administration and I'm trying to set up a project site archive system where my users can simply click a button/link either in the ribbon or on the home page of the project site somewhere, and cause the page to be relocated over to a blank site I've setup to hold old projects. Is this possible?

I was thinking it could possibly be done with workflows being triggered by a link or something, but I wasn't able to find any information on actually moving sites with workflows, only libraries/lists.

share|improve this question
add comment

1 Answer

It is possible. Just complex... the way I would tackle this (and there may be a better way) is to create a simple web part with one button. In the click event of the button I would use a mixture of C# (to create the new web and where ever possible) and to call code to run PowerShell stsadm commands to achieve this...

For the PowerShell commands see:

http://www.themackpage.com/2009/05/14/how-to-move-a-sharepoint-site/

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=205

To invoke PowerShell from C# see:

http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C

http://stackoverflow.com/questions/527513/execute-powershell-script-from-c-sharp-with-commandline-arguments

After you've made this web part (and thoroughly tested of course) I'd incorporate it into your master page.

Last words of advice: remember to check if it's a site collection or a web as the process varies, and make sure you disable it at the web application scope!

Like I said: possible, just complex.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.