can not access package

Hi all,

I used below script to import a xml file to sharepoint.

Import-SPSite -Identity -Path \\abcde\shared\file.xml -Force

iam a farm admin i got below error  

Import-SPWeb : Failed to read package file.
At line:1 char:1
+ Import-SPWeb -Identity -Path
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:
   SPCmdletImportWeb) [Import-SPWeb], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWe

How to resolve this issue and in sharepoint site where this xml file is imported.Please help.Thanks in advance.



May 20th, 2015 1:14am


According to your description, my understanding is that you want to import a xml file to SharePoint using PowerShell Command.

The Command "Import-SPWeb" is used to import a web ,list or  library, refer the article below:


If you want to import a xml file to SharePoint site, you can directly upload the xml to SharePoint site document library.

Here is a detailed articles for your reference:

Use PowerShell Cmdlets to Manage SharePoint Document Libraries


Best Regards

Free Windows Admin Tool Kit Click here and download it now
May 21st, 2015 2:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics