Restore-SPSite : A positional parameter cannot be found that accepts argument '$null'.

Restore-SPSite : A positional parameter cannot be found that accepts argument '$null'.
At line:1 char:15
+ Restore-SPSite <<<<  http://weekly-sn-cas.statoil.com/sites/ts-17067/ -Path C:\backup\ts-47438(1).bak
    + CategoryInfo          : InvalidArgument: (:) [Restore-SPSite], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite
plz give me solution above this
ravi sharepoint

Hello,
can you provide the command you execute?
Best regards, Christopher.
Blog |
Mail
Please remember to click "Mark As Answer" if a post solves your problem or
"Vote As Helpful" if it was useful.
Why mark as answer?

Similar Messages

  • Exchange 2010 - New-Mailbox - A positional parameter cannot be found that accepts argument '-PrimarySmtpAddress'.

    Hi,
    I am currently writing a powershell script that utilizes the new-mailbox command of EMS to create a shared mailbox.
    I am connecting to EMS via a remote PSSession object.
    When I try and specify an alternative SMTP address via the -PrimarySmtpAddress paramater I get the error
    " A positional parameter cannot be found that accepts argument '-PrimarySmtpAddress'.
    I have confirmed that the version of Exchange 2010 installed on the server should have this parameter - Version 14.3 (Build 123.4)
    An example command :-
    New-Mailbox -Shared -Name "SharedMailbox_test" -Alias "testsharedmailbox" -DisplayName "SharedMailbox_test" -UserPrincipalName "[email protected]" -OrganizationalUnit "OU=Mailboxes,OU=Accounts,DC=domain,DC=com"
    -Database "DB1" -PrimarySmtpAddress "[email protected]" -force
    Has anyone else experienced this behavior?
    Steve.
    Just a good old boy, never meaning no harm

    Hi Rich,
    That was my initial thought too, so I triple-checked my command to see if it was a simple syntax error - it wasn't.
    On further investigation I compared the list of parameters available in a DEV EMS session (on where I know the command works) against the one in PROD where the problem occurs.  Both sessions are running the same version of EMS.
    I ran the following to get a list of parameter names in both sessions :-
    $a = gcm New-Mailbox
    $a.Parameters.Keys | sort
    Here's the results :-
    DEV EMS (working)
    Prod EMS (missing)
    AccountDisabled
    ActiveSyncMailboxPolicy
    AddressBookPolicy
    Alias
    Alias
    Arbitration
    ArbitrationMailbox
    Archive
    ArchiveDatabase
    ArchiveDomain
    AsJob
    AsJob
    Confirm
    Confirm
    Database
    Database
    Debug
    Debug
    Discovery
    DisplayName
    DisplayName
    DomainController
    DomainController
    Equipment
    Equipment
    ErrorAction
    ErrorAction
    ErrorVariable
    ErrorVariable
    FirstName
    FirstName
    Force
    Force
    ImmutableId
    Initials
    Initials
    LastName
    LastName
    LinkedCredential
    LinkedDomainController
    LinkedMasterAccount
    ManagedFolderMailboxPolicy
    ManagedFolderMailboxPolicyAllowed
    ModeratedBy
    ModerationEnabled
    Name
    Name
    Office
    OrganizationalUnit
    OrganizationalUnit
    OutBuffer
    OutBuffer
    OutVariable
    OutVariable
    Password
    Phone
    PrimarySmtpAddress
    RemoteArchive
    RemotePowerShellEnabled
    ResetPasswordOnNextLogon
    ResetPasswordOnNextLogon
    ResourceCapacity
    RetentionPolicy
    RoleAssignmentPolicy
    Room
    Room
    SamAccountName
    SamAccountName
    SendModerationNotifications
    Shared
    Shared
    SharingPolicy
    ThrottlingPolicy
    UserPrincipalName
    UserPrincipalName
    Verbose
    Verbose
    WarningAction
    WarningAction
    WarningVariable
    WarningVariable
    WhatIf
    WhatIf
    It might be a permissions-based issue, but I don't own either EMS session so can't test personally.
    I will keep investigating and update here once I have some further information.
    Regards,
    Steve.
    Just a good old boy, never meaning no harm

  • Set-PhysicalDisk failing with error: A parameter cannot be found that matches parameter name 'MediaType'.

    Hi,
    I run the following command:
    PS C:\Users\Administrator> Set-PhysicalDisk -FriendlyName PhysicalDisk0 -MediaType SSD
    Set-PhysicalDisk : A parameter cannot be found that matches parameter name 'MediaType'.
    At line:1 char:46
    + Set-PhysicalDisk -FriendlyName PhysicalDisk0 -MediaType SSD
    + ~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Set-PhysicalDisk], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Set-PhysicalDisk
    PS C:\Users\Administrator>
    As you can see, it errors out, as if MediaType doesn't exist.  Has something changed in this command?

    Hi,
    As you said, it seems like MediaType is not supported as a parameter.
    What's the OS version? It should be available in Windows Server 2012 R2, Windows 8.1 or PowerShell 4.0 installed.
    In my Windows Server 2012 R2 it is supported.
    Please provide the result of $PSVersionTable for comparing. Here is my version:
    Name                           Value
    PSVersion                      4.0
    WSManStackVersion              3.0
    SerializationVersion           1.1.0.1
    CLRVersion                     4.0.30319.34014
    BuildVersion                   6.3.9600.17400
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
    PSRemotingProtocolVersion      2.2
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Element at position 2 cannot be found

    I have been beating my brains out trying to figure this out. If any of you have thoughts, I would love to hear them. I have a cflocation to redirect to PayPal as follows...
    <cflocation url="https://www.paypal.com/cgi-bin/websrc?tax_cart=#WA_eCart_FormatNumber(WA_eCart_GetTax(whit cart), false, 2)#&no_note=0&no_shipping=1&return=http://xxxxxxxx.com/paypalsuccess.cfm&cmd=_cart&upload=1&currency_code=USD&address_overrid e=0&firstname=#IIf(isDefined('session.firstname'),'session.firstname',DE(''))#&lastname=#I If(isDefined('session.lastname'),'session.lastname',DE(''))#&street1=#IIf(isDefined('sessi on.street1'),'session.street1',DE(''))#&street2=#IIf(isDefined('session.street2'),'session .street2',DE(''))#&city=#IIf(isDefined('session.city'),'session.city',DE(''))#&state_provi nce=#IIf(isDefined('session.state_province'),'session.state_province',DE(''))#&postcode=#I If(isDefined('session.postcode'),'session.postcode',DE(''))#&country=#IIf(isDefined('sessi on.country'),'session.country',DE(''))#&email=#IIf(isDefined('session.email'),'session.ema il',DE(''))#&phone=#IIf(isDefined('session.phone'),'session.phone',DE(''))#&ordernumber=#I If(isDefined('session.ordernumber'),'session.ordernumber',DE(''))#&handling_cart=#WA_eCart _FormatNumber(WA_eCart_GetShipping(whitcart)+WA_eCart_GetCharges(whitcart), false, 2)#&
    <cfoutput>
        <CFLOOP FROM='1' TO='#ArrayLen(session.whitcart_items)#' INDEX='i'>
            <CFLOOP COLLECTION='#session.whitcart_items[i]#' ITEM='y'>
                <CFIF StructKeyExists(session.whitcart_items[i], y)>
                    #y#=#session.whitcart_items[i][y]#&
                </CFIF>
            </CFLOOP>
        </CFLOOP>
    </cfoutput>
    [email protected]" />
    When I run this, it comes back with element at position 2 cannot be found. The probem is that my array only has one item in it. I dumped it to the screen and see this...
    Price=0.01 TotalPrice=0.01 Name=The_Day_After_His_Birth.pdf Weight=0 Description=The Day After His Birth FullDetails=1 The_Day_After_His_Birth.pdf (2) ID=2 TotalWeight=0 Quantity=1
    So I am struggling as to what is occurring.
    Thoughts?

    Dan Bracuk wrote:
    So in other words, it's a 1D array.  That means this line will never work:
    #y#=#session.whitcart_items[i][y]#
    Well it should work as long as 'i' is an integer in the set of {1} and 'y' is a string in the set of {'Description','FullDetails','ID',etc}
    I.E this hard coded example should work.
    <cfoutput>Description = #session.whitcart_items[1]["Description"]#</cfoutput>
    Thus, this should also work.
    <cfset i = 1>
    <cfset y = "Description">
    <cfoutput>#y# = #session.whitchat_items[i][y]</cfoutput>

  • TS3694 itunes unable to restore my ipod as ipod cannot be found?

    My son updated his ipod to ios7 then forgot his passcode. I have followed the steps to restore the ipod but I am getting a message stating ipod cannot be restored. Device cannot be found. How can get his ipod back up and running?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software

  • Positional parameter for -asjob

    $asjob = $true
    if ($asjob){$asjobcommand = "-asjob"}else{$asjobcommand = ""}
    $asjobcommand
    $computername = "abc"
    Invoke-command -computername $computername $asjobcommand -scriptblock{write-host "code"}
    Invoke-Command : A positional parameter cannot be found that accepts argument '-asjob'.
    At line:8 char:1
    + Invoke-command -computername $computername "$asjobcommand" -scriptblock{write-ho ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Invoke-Command], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeCommandCommand
    Can anyone point me into the right direction on this one? I understand why its happening i just don't know how to fix it.

A: Positional parameter for -asjob

Figured it out after i released you do do -asjob:$true -asjob:$false
$asjob = $true
if ($asjob){$asjobcommand = $true}else{$asjobcommand = $false}
$asjobcommand
$computername = "abc"
Invoke-Command -computername $computername -scriptblock{write-host "code"} -asjob:$asjobcommand

Figured it out after i released you do do -asjob:$true -asjob:$false
$asjob = $true
if ($asjob){$asjobcommand = $true}else{$asjobcommand = $false}
$asjobcommand
$computername = "abc"
Invoke-Command -computername $computername -scriptblock{write-host "code"} -asjob:$asjobcommand

  • Powershell date range positional parameter error

    I am trying to export emails sent to a particular email address in a specific date range.  I can run the command and it works fine without the date range, but when I try to include it it errors out.  Any help appreciated.
    Working command without date range:
    Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery “To:’[email protected]’” -TargetMailbox "SearchResults" -TargetFolder Export
    And repeat it using “From” instead of “To”
    When I try to add a date range though like this:
    Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery “To:’[email protected]’” -ContentFilter {(Received -gt '08/15/2014') -and (Received -lt '02/18/2015')} -TargetMailbox "SearchResults" -TargetFolder Export
    I get the below error listing:
    A positional parameter cannot be found that accepts argument '(Received -gt '08/15/2014') -and (Received -lt '02/18/201
    5')'.
        + CategoryInfo          : InvalidArgument: (:) [Search-Mailbox], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Search-Mailbox
    Invoke-Command : Cannot write input as there are no more running pipelines
    At C:\Users\exservice\AppData\Roaming\Microsoft\Exchange\RemotePowerShell\kc-exchange.us.org\kc-exchange.us.org.p
    sm1:43760 char:29
    +             $scriptCmd = { & <<<<  $script:InvokeCommand `
        + CategoryInfo          : InvalidOperation: (:) [Invoke-Command], PSInvalidOperationException
        + FullyQualifiedErrorId : NoMoreInputWrite,Microsoft.PowerShell.Commands.InvokeCommandCommand

    Get-Mailbox -ResultSize Unlimited |
    Search-Mailbox -SearchQuery "Received:> $('2014-08-15') AND Received:< $('2015-02-18') AND To:'[email protected]'" -TargetMailbox "SearchResults" -TargetFolder Export

  • TS3694 has anyone else had this problem of all of a sudden seeing iTunes music note and connector USB port showing up on their iPod touch.Then when you hook it up it says you need to restore and when you try to it says cannot be found and error 3194?

    Has anyone had the problem of suddenly seeing your iPod with a Itunes symbol and a connect USB port wire. Then when you connect to computer it says it must restore.Then you attempt to restore and is says iPod cannot be found and a error 3194?

    3194
    See the actions for that error here:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    iPhone Error 3194 - How to Fix iTunes Error 3194?
    Fix Error 3194 from iTunes during iPhone restore

  • HT201210 Itunes cannot restore my ipad. It says device cannot be found. What do I do next?

    My ipad says to connect to itunes. It is updated but now will not restore. It says device cannot be found. Now, what do I do?

    You should also ask this in the iPad forum. This is the forum for the white and black plastic MacBooks that were discontinued in 2010. You should also post this question there to increase your chances of getting an answer.
    https://discussions.apple.com/community/ipad/using_ipad

  • Error  3ivx.dec.dll cannot be found

    PC system crashed and I did a system restore, losing all of my registrations for my software. Once I Deleted the old QT and downloaded the latest QT and got my Pro key today, the registration works fine, but when I go to actually open the program, I get the message that "the file 3ivx.dec.dll cannot be found - please reinstall."
    Reintalled four times today, but I still can't open the program.
    Help would be appreciated.

    the file 3ivx.dec.dll cannot be found
    That one's associated with your 3ivx:
    http://www.3ivx.com/
    Is your 3ivx product currently up to date?

  • HT1414 I have iphone 4; tried to sync it said I need to update software so I clicked ok - it then said I need to restore and did above got to stage 3, clicked restore and update, but it comes up with an error saying iphone cannot be found Please help!!!

    I have iphone 4; tried to sync it said I need to update software so I clicked ok - it then said I need to restore and did above got to stage 3, clicked restore and update, but it comes up with an error saying iphone cannot be found Please help!!!

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

  • HT201210 I'm trying to restore my iPhone, but get an error message 'the iPhone cannot be restored, the device cannot be found.  How can I resolve this?

    I'm trying to restore my iPhone, but get an error message 'the iPhone cannot be restored, the device cannot be found.  How can I resolve this?

    iOS: Unable to update or restore

  • Hi i have a iphone 5 and it is in recovery mode and it says i have to restore it before i can do anything else but when i try to restore it say the iphone cannot be restored it can not be found

    hi i have a iphone 5 and it is in recovery mode and it says i have to restore it before i can do anything else but when i try to restore it say the iphone cannot be restored it can not be found
    please get back to me as soon as possible
    ~bananagirl16

    Turn your phone off and connect your cable to the computer, but not the device just yet. Start up iTunes. Now, hold down the home button on your phone and plug it in to the cable - don't let go of the button until iTunes tells you it's detected a phone in recovery mode. Now you can restore to factory settings.

  • The iPhone iPhone could not be restored. The device cannot be found.

    Hello,
            Just tried to update software on my Iphone4 and it failed now whenever I try and restore it
            It comes up with this message "The Iphone iphone could not be restored.The device cannot be found"
            Ive had a look on the web but cannot find any HELP!!
            If you can help me, a few nudges in the right direction would be very well recieved

    Ok,
           The Phone is now restoring, looked everywhere for an answer, tried the holding down of the home/standby
            buttons, started the recovery ,extracted the software, then it would say "the  iphone iphone could not be                restored .The device could not be found" done this about 4 times
           The solution!!!  gave it to a friend who put it on his PC (I have an Imac) and he reset it, then plugged back            into Mac and it restored it back to the last restore
           one point i did notice you have to take your pin off, it said something like insert pin free sim
           Hope this helps somebody

  • I upgrade ios 4 to ios 5.It is completed but when i try to restore all the apps back up before,at last it's written the apps cannot be found(all the apps).

    i upgrade ios 4 to ios 5.It is completed but when i try to restore all the apps back up before,at last it's written the apps cannot be found(all the apps).

    The backup that itunes performs does no include any itunes content ( apps/music/vids/etc).
    You should have transferred any purchases to your computer.
    If you failed to do this, then you will have to redownload:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Maybe you are looking for

    • Primary desktop is no longer recognized as primary

      So i sync'd my phone few days ago on my desktop and it was perfect. today, i went to do another full backup/sync and it says it was previvously sync'd with Jason-Desktop. this is my current computer name. computer has not changed. i did however make

    • Reverse service entry sheet

      Hi, We are involved in implementing Transportation module for an FMCG client, we were trying to show the reverse cycle to the client. Service PO has been raised, GR done and service entry sheet generated and has been accepted. Now we want to reverse

    • Iphoto 6.0.6 hangs

      Any time I try to order prints, books or cal.. iphoto 6 hangs. I tried clearing the net services from the key chain and made sure all s/w is the current version. I'm running 10.4.11 and iphoto 6.0.6. Any ideas would be great! Thanks.

    • AF doesn't appear in Creative Cloud

      I can't install After Effects, 'cause it doesn't appear in Creative Cloud. Is there Another way to install AF?

    • Problem plotting a function - HP50G

      Hello everyone.I know how to plot some simple functions like Y(X)=X or Y(X)=X^2, using: white key - F1, but now I have to plot some other functions and the calculator doesn't give me any proper answer. This is the function I have to plot: Y1(X)=((10^