Get-MsolUser error


When executing  Get-MsolUser UserPrincipalName "" I get the following error - Get-MsolUser : A positional parameter cannot be found that accepts argument 'UserPrincipalName'.
At line:1 char:1
+ Get-MsolUser UserPrincipalName ""
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-MsolUser], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.Online.Administration.Automation.GetUser

Anyone knows what may be going on?

  • Steep2222 5/25/2017, 10:05:55 AM

    Can't freaking get a single thing out of this mumbling.....

  • C.C. 5/26/2017, 8:55:40 AM

    to Steep2222, in that case, you don't really have to leave any comments, you know....

  • snJezy0 7/17/2017, 9:17:11 AM

    I've got the same problem…

Add comment

Choose authorization option

Log in

If you have an account on CentrumXP this option will be best for you.

Log in
Join community

Our registered users have extra privileges like adding questions, commenting, and voting.


Answer: 1

Before UserPrincipalName you need to place '-'  it should look like this -UserPrincipalName

3 years ago
3 years ago
Correct answer