'Hypocritical' Error when Running New-Mailbox

Welcome Forums General PowerShell Q&A 'Hypocritical' Error when Running New-Mailbox

This topic contains 2 replies, has 2 voices, and was last updated by

2 years, 10 months ago.

  • Author
  • #38035

    Points: 0
    Rank: Member

    This is a cross post from /r/Powershell, then I realised I've never used the main globalcommunity! Hi everyone, look forward to working with you all.

    Down to business...

    I'm running:

     New-Mailbox -Alias alias.alias -Name "WhiteSpace Support" -FirstName ***** -LastName ***** -DisplayName "Display name" -UserPrincipalName "blah@blah.com" -Password (ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force) 

    Which gives out the error:

      A parameter cannot be found that matches parameter name 'UserPrincipalName'. 

    When I remove the -UserPrincipalName parameter, I get asked to define the UserPrincipalName manually.
    What gives?

  • #38036

    Points: 26
    Rank: Member

    What does this command gives you back:

    Get-Command New-Mailbox -Syntax
  • #38045

    Points: 0
    Rank: Member

    Ah, so the Syntax path I followed doesn't include that parameter, so need to define it afterwards.

The topic ‘'Hypocritical' Error when Running New-Mailbox’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort