Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Create a New Mailbox in Exchange Server Using PowerShell

Creating a new mailbox in an Exchange Server environment is a common task for systems engineers managing email services. While this task is not directly related to the Windows operating system itself, it is relevant in the context of managing Microsoft Exchange Server, which is a widely used email server that runs on Windows Server. In this article, we will explore how to create a new mailbox using PowerShell, a task that is essential for managing user accounts and email services in an Exchange environment.

Examples:

Example 1: Creating a New Mailbox for a User

To create a new mailbox for a user in Exchange Server, you can use the New-Mailbox cmdlet in the Exchange Management Shell, which is a specialized version of PowerShell for managing Exchange Server. Here is a step-by-step example:

  1. Open Exchange Management Shell:

    • On your Windows Server where Exchange is installed, open the Exchange Management Shell. This can be done by searching for "Exchange Management Shell" in the Start menu.
  2. Run the New-Mailbox Command:

    • Use the following command to create a new mailbox for a user. Replace the placeholders with actual values.
    New-Mailbox -Name "John Doe" -Alias jdoe -UserPrincipalName jdoe@example.com -FirstName John -LastName Doe -DisplayName "John Doe" -Password (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force)
    • Parameters Explained:
      • -Name: The name of the mailbox.
      • -Alias: A unique alias for the mailbox.
      • -UserPrincipalName: The email address for the user.
      • -FirstName and -LastName: The user's first and last names.
      • -DisplayName: The display name for the mailbox.
      • -Password: The password for the mailbox, converted to a secure string.
  3. Verify the Mailbox Creation:

    • After running the command, you can verify that the mailbox was created successfully by running:
    Get-Mailbox -Identity jdoe

    This command will display the properties of the newly created mailbox, confirming its creation.

Example 2: Creating a Shared Mailbox

To create a shared mailbox, which is used by multiple users, you can use the following command:

New-Mailbox -Shared -Name "Support Team" -Alias support -UserPrincipalName support@example.com -DisplayName "Support Team"
  • The -Shared parameter specifies that the mailbox is a shared mailbox.

Alternatives in Windows Environment

If you are not using Exchange Server but need similar functionality in a Windows environment, consider using Microsoft 365 (formerly Office 365) with Exchange Online, which provides cloud-based email services. You can manage mailboxes using PowerShell for Microsoft 365.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.