none
Office 365 MailUser Creation Error RRS feed

  • Question

  • Hi Expers

    I have developed the wcf web service for creating the user mailboxes and mail users in office 365. This web service deployed in IIS 7.5 in Windows 7.

    I was not able to create the Mail Users using the Web Service and Its throwing Exception while creating the mail users.

    Web Service Code to Create The Mail Users

    Command command= new Command();

    RunspaceInvoke rsi = new RunspaceInvoke();

    System.Security.SecureString sBlock = (System.Security.SecureString)rsi.Invoke("(ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force)")[0].BaseObject;

    command.Parameters.Add("Password",sBlock );

    command.Parameters.Add("MicrosoftOnlineServicesID","abc@abcoffice365-dev.com"); 

    command.Parameters.Add("Name","abc123");

     

    PowerSehll ps= PowerShell.CreatePowerShell();

    ps.Commands.AddCommand(command);

    ps.invoke();

    Exception Details

    processPowerShell Remote Parameter set cannot be resolved using the specified named parameters.

    System.Management.Automation.RemoteException: Parameter set cannot be resolved using the specified named parameters.
       at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
       at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
       at System.Management.Automation.PowerShell.Invoke()

       at LiveConnector.liveedu.LCSCommon.processPowerShell(ICollection`1 processCommands, LCSOperationStatus status)

    Error Record Details from Exception

    error.FullyQualifiedErrorId    :AmbiguousParameterSet,New-MailUser
    error.CategoryInfo.Category :InvalidArgument
    error.CategoryInfo.Activity    :New-MailUser
    error.CategoryInfo.Reason   :ParameterBindingException

    Any Idea Why it is throwing exception while creating mail users in Office 365  using IIS Web Service.


    Help is greatly appreciated.

    Thanks

    Ameer Basha

    Thursday, December 6, 2012 5:45 PM

All replies

  • From what I can tell, you're trying passing along a parameter which isn't supported:

    error.FullyQualifiedErrorId    :AmbiguousParameterSet,New-MailUser
    error.CategoryInfo.Category :InvalidArgument

    Given that your didn't share the entire code, it's hard to say which one.


    Michael Van Horenbeeck
    Check out my blog or find me on twitter

    Thursday, December 13, 2012 11:03 AM