locked
powershell RRS feed

  • Question

  • new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser

    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser
    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser
    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser
    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser
    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser
    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser

    new-MsolUser : Invalid syntax.  Parameter Name: USERPRINCIPALNAME.
    At line:1 char:62
    + ... ach-Object {new-MsolUser -UserPrincipalName $_."UPN" -AlternateEmailA ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [New-MsolUser], MicrosoftOnlineException
        + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.StringSyntaxValidationException,Microsoft.Onl
       ine.Administration.Automation.NewUser

    please see below the commands I am using, I get the above errors, Please see beginning of this page

    Sunday, August 19, 2018 9:03 AM

All replies

  • We need to see the input and code samples. If you are importing from CSV, are the values in the UPN column in the format of, for example, john.doe@domain.com ?
    Sunday, August 19, 2018 9:54 AM