Edit

Share via


Remove-AzDataShare

Removes a data share.

Syntax

ByFieldsParameterSet (Default)

Remove-AzDataShare
    -ResourceGroupName <String>
    -AccountName <String>
    -Name <String>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByResourceIdParameterSet

Remove-AzDataShare
    -ResourceId <String>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByObjectParameterSet

Remove-AzDataShare
    -InputObject <PSDataShare>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AzDataShare cmdlet removes a data share.

Examples

Example 1

Remove-AzDataShare -ResourceGroupName "ADS" -AccountName "WikiAds" -Name "AdsShare"
Are you sure you want to remove data share "AdsShare"?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

This commands removes the data share named AdsShare from the azure data share account WikiAds.

Parameters

-AccountName

Azure data share account name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AsJob

{{Fill AsJob Description}}

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

yaml Type: SwitchParameter Parameter Sets: (All) Aliases: cf

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Azure data share object` ``yaml Type: PSDataShare Parameter Sets: ByObjectParameterSet Aliases:

Required: True Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False

Parameter properties

Type:PSDataShare
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Azure data share name

yaml Type: String Parameter Sets: ByFieldsParameterSet Aliases:

Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Return object (if specified).

yaml Type: SwitchParameter Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The resource group name of the azure data share account

yaml Type: String Parameter Sets: ByFieldsParameterSet Aliases:

Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFieldsParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

The resource id of the Azure data share

yaml Type: String Parameter Sets: ByResourceIdParameterSet Aliases:

Required: True Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

yaml Type: SwitchParameter Parameter Sets: (All) Aliases: wi

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False

yaml Type: Microsoft.Azure.PowerShell.Cmdlets.DataShare.Models.PSDataShare Parameter Sets: ByObjectParameterSet Aliases:

Required: True Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

PSDataShare

Outputs

Boolean