locked
" FullyQualifiedErrorId : AmbiguousParameterSet,Enable-RemoteMailbox" RRS feed

  • Question

  • Hi 

    I am trying to enable remote mailbox for multiple user using CSv file input, but while running the script getting below error

    Parameter set cannot be resolved using the specified named parameters.
        + CategoryInfo          : InvalidArgument: (:) [Enable-RemoteMailbox], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameterSet,Enable-RemoteMailbox
        + PSComputerName        : CAS1

    While I am able to enable-remotemailbox for single user w/o csv file input.

    Please help..

    Here is script

    $Users=Import-csv -Path "D:\Input2.csv"
    $Users | ForEach-Object {
    Enable-RemoteMailbox -Identity $_.samaccount -Alias $_.samaccount -RemoteRoutingAddress ($_.samaccount+'@domain.mail.onmicrosoft.com') -Archive
    }

    In exchange hybrid mode

    Thank you..


    Thanks, Sunil Gupta Sunilgupta@sunilgupta.com

    Saturday, October 1, 2016 9:10 AM

Answers

  • Remove "-Archive"

    Look at help to see the parameter sets that are allowed.


    \_(ツ)_/

    • Marked as answer by Sunil K Gupta Monday, October 3, 2016 6:47 AM
    Saturday, October 1, 2016 4:08 PM

All replies

  • Remove "-Archive"

    Look at help to see the parameter sets that are allowed.


    \_(ツ)_/

    • Marked as answer by Sunil K Gupta Monday, October 3, 2016 6:47 AM
    Saturday, October 1, 2016 4:08 PM
  • Hi Sunil,

    >>Parameter set cannot be resolved using the specified named parameters.

    You could also try to find out which parameter cannot be resolved, using trace-command:

    https://technet.microsoft.com/en-us/library/hh849955.aspx

    Besides, i suppose the following link could help to better understand this cmdlet:

    https://technet.microsoft.com/en-us/library/jj614563.aspx

    Best regards,

    Andy


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, October 3, 2016 12:28 AM
  • Thank you JRV -- I removed the -Archive switch and the script worked :)


    Thanks, Sunil Gupta Sunilgupta@sunilgupta.com

    Monday, October 3, 2016 6:47 AM
  • Thank you Andy for Sharing the links -- the links are more useful :)

    Thanks, Sunil Gupta Sunilgupta@sunilgupta.com

    Monday, October 3, 2016 6:48 AM
  • You're welcome.Sunil!

    Best regards,

    Andy


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Saturday, October 8, 2016 1:53 AM