locked
Restore-SP Site Error RRS feed

  • Question

  • Hello,

    I am using this script and gettign positional argument error:

    Restore-SPSite http://devcthub.ridley.com.au-Path D:\Backups\WSS_Content_RIDCTHub_backup_2015_05_25_190002_8707869.bak -DatabaseServer RIDSTHSPSD01\SHAREPOINT-DatabaseName WSS_Content_Dev_RIDCTHub -HostHeaderWebApplication http://Ridsthspsd01-Force

    Restore-SPSite : A positional parameter cannot be found that accepts argument
    'C:\Restore\WSS_Content_RIDCTHub_backup_2015_05_25_190002_8707869.bak'.
    At line:1 char:1
    + Restore-SPSite http://devcthub.ridley.com.au-Path C:\Restore\WSS_Content_RIDCTHu ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Restore-SPSite], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite

    Do you know the reason?

    Thanks

    Wednesday, June 3, 2015 3:24 AM

Answers

  • Hi

    It seems to be little formatting issue. Please use below updated command-

    Restore-SPSite "http://devcthub.ridley.com.au" -Path "D:\Backups\WSS_Content_RIDCTHub_backup_2015_05_25_190002_8707869.bak" -DatabaseServer "RIDSTHSPSD01\SHAREPOINT" -DatabaseName "WSS_Content_Dev_RIDCTHub" -HostHeaderWebApplication "http://Ridsthspsd01" -Force
    Hope it helps.


    Danny
    MCTS, MCP
    LinkedIn | Twitter


    Please remember to "Mark as Answer" if it works or vote of it is helpful.

    Wednesday, June 3, 2015 5:49 AM

All replies

  • Hi

    It seems to be little formatting issue. Please use below updated command-

    Restore-SPSite "http://devcthub.ridley.com.au" -Path "D:\Backups\WSS_Content_RIDCTHub_backup_2015_05_25_190002_8707869.bak" -DatabaseServer "RIDSTHSPSD01\SHAREPOINT" -DatabaseName "WSS_Content_Dev_RIDCTHub" -HostHeaderWebApplication "http://Ridsthspsd01" -Force
    Hope it helps.


    Danny
    MCTS, MCP
    LinkedIn | Twitter


    Please remember to "Mark as Answer" if it works or vote of it is helpful.

    Wednesday, June 3, 2015 5:49 AM
  • Put an space before -path and you should be fine.


    Thanks Mohit

    Wednesday, June 10, 2015 9:21 AM