Solved

Sharepoint 2010 Site Export via Powershell

Posted on 2013-01-14
10
590 Views
Last Modified: 2013-02-06
Hi,

I am trying to export a site so i can then import as a subsite. I am using the following command but receive an error. I can hit the site via the URL in the command, do I have a syntax problem? Running 2010 with all the latest patches and updates. I am running this command from the Sharepoint powershell command prompt.

PS C:\Users\administrator\desktop> Export-SPWeb http://sharepoint/phx20

cmdlet Export-SPWeb at command pipeline position 1
Supply values for the following parameters:
Path: c:\export\phx20.bak
Export-SPWeb : Cannot find an SPWeb object with Id or Url :
http://sharepoint/phx20.
At line:1 char:1
+ Export-SPWeb http://sharepoint/phx20

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidData: (Microsoft.Share...CmdletExportWeb:
   SPCmdletExportWeb) [Export-SPWeb], SPCmdletPipeBindException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletExportWeb
0
Comment
Question by:hoffmanconsultingllc
  • 5
  • 3
  • 2
10 Comments
 
LVL 38

Expert Comment

by:Justin Smith
ID: 38776726
Might not have access to run PShell commands against that content db.  Do you know the name of the content database?  You need to run the following for your user name and content db (that contains the http://sharpoint site):

Add-SPShell -UserName domain\user -Database <database name>
0
 
LVL 1

Author Comment

by:hoffmanconsultingllc
ID: 38776768
I am logged into the box under the enterprise administrator account, I cant imagine that does not have the correct permissions. It is stating it is not a valid url if i read it correctly, which does not make sense since it comes up in a browser on the sharepoint server and on the rest of the network.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 38776875
If you installed SharePoint using this account, then yes, it would have the necessary permissions already.  If you didn't use this account to install, no guarantees.


_________________________________________________________
Follow me on Twitter!  @justinsmith317
0
 
LVL 14

Expert Comment

by:KoenVosters
ID: 38777276
You have to be farm administrator to do that. Check that you are. It is stating that it is not a valid url as it can't find the url with the credentials you provided.
0
 
LVL 1

Author Comment

by:hoffmanconsultingllc
ID: 38780168
Ok,

I have logged on as the account that I installed SharePoint with and received the same results. The account is also a local admin and in the administrators group under SharePoint central config.

Any other ideas?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 38

Expert Comment

by:Justin Smith
ID: 38780193
For the heck of it, run the command I posted above.
0
 
LVL 1

Author Comment

by:hoffmanconsultingllc
ID: 38780285
What would the database name be? The content db or?

Thanks
0
 
LVL 14

Expert Comment

by:KoenVosters
ID: 38782224
Yes, the content db
0
 
LVL 1

Accepted Solution

by:
hoffmanconsultingllc earned 0 total points
ID: 38844279
I was unable to get the powershell commands to run no matter what I did. Finally found how to do it via central admin and that worked.

Here is the link on how to export the site via central admin.

How to export a site via Central Administration
0
 
LVL 1

Author Closing Comment

by:hoffmanconsultingllc
ID: 38858710
The other solutions did not work.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now