• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 612
  • Last Modified:

Sharepoint 2010 Site Export via Powershell

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
hoffmanconsultingllc
Asked:
hoffmanconsultingllc
  • 5
  • 3
  • 2
1 Solution
 
Justin SmithSr. System EngineerCommented:
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
 
hoffmanconsultingllcAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
KoenVostersCommented:
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
 
hoffmanconsultingllcAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
For the heck of it, run the command I posted above.
0
 
hoffmanconsultingllcAuthor Commented:
What would the database name be? The content db or?

Thanks
0
 
KoenVostersCommented:
Yes, the content db
0
 
hoffmanconsultingllcAuthor Commented:
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
 
hoffmanconsultingllcAuthor Commented:
The other solutions did not work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now