2

i have typed the following inside PowerShell:-

PS C:\Windows\system32> Restore-spsite ? cmdlet Restore-SPSite at command pipeline position 1 Supply values for the following parameters: Path: "C:\Users\m.g\Desktop\Backup\Intranet" Confirm Are you sure you want to perform this action? Performing operation "Restore-SPSite" on Target "?". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):y 

But power shell will raise the following exception,

Restore-spsite : Invalid URI: The format of the URI could not be determined. At line:1 char:1 + Restore-spsite ? + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...dletRestoreSite: SPCmdletRestoreSite) [Restore-SPSite], UriFormatException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreS ite

If i understand the error right, power shell is unable to understand the following path C:\Users\m.g\Desktop\Backup\Intranet which contain the backup file, is that right ? and if yes then why power shell did not understand this path ?? Thanks

2
  • 1
    What is the point of the ? you type after the cmdlet? Commented Sep 9, 2013 at 17:14
  • trying to get help on the command? Commented Sep 9, 2013 at 17:44

4 Answers 4

2

Restore-SPSite will require two parameters

  • Identity - your site collection url
  • Path -backup path of site you wanted to restore (full file path till .bak)
1
  • Also add "-Force" attribute Commented Jul 21, 2017 at 7:54
0

There might be a lot of point where you probably making mistake.

Check possible reasons could be here: http://msdn.microsoft.com/en-us/library/z6c2z492(v=VS.100).aspx

0

I believe that you need to provide the site that you're restoring to with your command line. So, for example, if you were restoring to http://intranet/sites then your command would look like:

PS C:\Windows\system32> Restore-spsite http://intranet/sites

-1

Did you try to restore to a host header web application?

if so use:

$w = Get-SPWebApplication <your webapp> Restore-SPSite -Identity <URL of sitecol> -Path <path to backup> -HostHeaderWebApplication $w.Url 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.