Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 3.22 KB

File metadata and controls

79 lines (54 loc) · 3.22 KB
author v-vprasannak
ms.service azure-communication-services
ms.custom devx-track-azurepowershell
ms.topic include
ms.date 04/29/2024
ms.author v-vprasannak

Prerequisites

Create Email Communication Service resource

To create an Email Communication Service resource, sign into your Azure account using the Connect-AzAccount using the following command and provide your credentials.

PS C:\> Connect-AzAccount

First, install the Azure Communication Services module Az.Communication using the following command.

PS C:\> Install-Module Az.Communication

To create a resource, run the following command:

PS C:\> New-AzEmailService -ResourceGroupName ContosoResourceProvider1 -Name ContosoEmailServiceResource1 -DataLocation UnitedStates

If you want to select a specific subscription, you can also specify the --subscription flag and provide the subscription ID.

PS C:\> New-AzEmailService -ResourceGroupName ContosoResourceProvider1 -Name ContosoEmailServiceResource1 -DataLocation UnitedStates -SubscriptionId SubscriptionID

You can configure your Communication Services resource with the following options:

  • The resource group.
  • The name of the Email Communication Services resource.
  • The geography to be associated with the resource.

In the next step, you can assign tags to the resource. Use tags to organize your Azure Email resources. For more information about tags, see the resource tagging.

Manage your Email Communication Services resource

To add tags to your Email Communication Services resource, run the following commands. You can also target a specific subscription.

PS C:\> Update-AzEmailService -Name ContosoEmailServiceResource1 -ResourceGroupName ContosoResourceProvider1 -Tag @{ExampleKey1="ExampleValue1"}

PS C:\> Update-AzEmailService -Name ContosoEmailServiceResource1 -ResourceGroupName ContosoResourceProvider1 -Tag @{ExampleKey1="ExampleValue1"} -SubscriptionId SubscriptionID

To list all of your Email Communication Service resources in a given subscription, use the following command:

PS C:\> Get-AzEmailService -SubscriptionId SubscriptionID

To list all the information on a given resource, use the following command:

PS C:\> Get-AzEmailService -Name ContosoEmailServiceResource1 -ResourceGroupName ContosoResourceProvider1

Clean up resource

If you want to clean up and remove an Email Communication Services resource, You can delete your Email communication resource by running the following command:

PS C:\> Remove-AzEmailService -Name ContosoEmailServiceResource1 -ResourceGroupName ContosoResourceProvider1

Note

Resource deletion is permanent and no data, including Event Grid filters, phone numbers, or other data tied to your resource, can be recovered if you delete the resource.