Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.53 KB

accept-share-invitations-powershell.md

File metadata and controls

46 lines (34 loc) · 1.53 KB
titledescriptionauthorms.authorms.servicems.topicms.datems.custom
PowerShell script: Accept invitation from an Azure Data Share
This PowerShell script accepts invitations from an existing data share.
sidontha
sidontha
azure-data-share
article
02/12/2025
devx-track-azurepowershell

Use PowerShell to accept a data share invitation

This PowerShell script accepts invitations sent to a consumer.

Sample script

#List invitations sent to a consumerGet-AzDataShareInvitation# Set variables with your own values$resourceGroupName="<Resource group name>"$dataShareAccountName="<Data share account name>"$dataShareName="<Data share name>"$invitationId="<Invitation id>"#Accept a specific invitation by creating a share subscriptionNew-AzDataShareSubscription-ResourceGroupName $resourceGroupName-AccountName $dataShareAccountName-Name $dataShareName-InvitationId $invitationId

Script explanation

This script uses the following commands:

CommandNotes
Get-AzDataShareInvitationGet and list sent data share invitations.
New-AzDataShareSubscriptionCreate a data share subscription.

Related content

For more information on the Azure PowerShell, see Azure PowerShell documentation.

Other Azure Data Share PowerShell script samples can be found in the Azure Data Share PowerShell samples.

close