Create equipment account using Exchange Online with specified upn

Viewed 21
$tenant = "contoso.com"
$domain = "my.contoso.com"
$Password = ConvertTo-SecureString -String "2@Pass2,3" -AsPlainText -Force
New-MailBox -Name "Equipment01" -Equipment `
-MicrosoftOnlineServicesID "Equipment01@$domain" `
-Password $Password -PrimarySmtpAddress "Equipment01@$tenant" 

Throws exception:

Parameter set cannot be resolved using the specified named parameters.
    + CategoryInfo          : InvalidArgument: (:) [New-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,New-Mailbox
    + PSComputerName        : outlook.office365.com

How to fix that

0 Answers
Related