Share via

Adding Shared Mailbox using Powershell

Anonymous
2017-08-14T12:27:25+00:00

I am trying to add a Shared Mailbox using PowerShell but get an error when trying to do so.

I’ve run the following commands to connect to exchange online: -

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

I receive a warning message about unapproved verbs!

Then I’m trying to run New-Mailbox command and this is where I get the error

New-Mailbox -Shared -Name "Test Mailbox" -DisplayName "Test Mailbox" -Alias Test

I receive this error:-

A parameter cannot be found that matches parameter name ‘Shared’

Looks like I am missing parameters?

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2017-08-14T18:03:57+00:00

Hi Coxy05,

It seems the error occurred at an earlier time. When running the Import-PSSession $Session parameter, you've already receive a warning message about unapproved verbs. However, you just ignored it and moved on.

Before using remote PowerShell to connect to Exchange Online on your local PC, please check whether you have met all the requirement.

1. You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see Installing the .NET Framework and Windows Management Framework 3.0 or Windows Management Framework 4.0.

2. Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You get the following error when you try to connect:

Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.

To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting Run as administrator):

Set-ExecutionPolicy RemoteSigned

You need to configure this setting only once on your computer, not every time you connect.

For info, please refer to https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx

If the issue persists, please share the screenshot of the PowerShell output for analysis.

Thanks,

Lance

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2017-08-16T22:24:58+00:00

    Hi Coxy05,

    Do you have any update?

    Thanks,

    Lance

    Was this answer helpful?

    0 comments No comments