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"

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

  • 1
    What is the point of the ? you type after the cmdlet? – Anders Rask Sep 9 '13 at 17:14
  • trying to get help on the command? – Eric Alexander Sep 9 '13 at 17:44

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)
  • Also add "-Force" attribute – love thakker Jul 21 '17 at 7:54

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


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


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 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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