Powershell script to create shared mailbox and E1/E3 User in hybrid

lalajee 1,821 Reputation points
2023-02-14T00:45:13.34+00:00

Hi,

I'm trying to write an powershell script to create shared mailbox and new user account with E1 or E3 lic

Shared Mailbox Requirement

  • Create new shared mailbox in office 365 - Need to check make sure shared mailbox doesn't existed
  • Create new security group - Need to make sure Security group doesn't existed before creating
  • Assign Full access/Send as permission for the security group above
New-RemoteMailbox -Shared -Name "SharedMailbox1" `
    -UserPrincipalName "******@domian.com" -OnPremisesOrganizationalUnit "OU=Shared,OU=Company,DC=local" `
    -RemoteRoutingAddress "******@domain.mail.onmicrosoft.com"

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.