Skip to content

Latest commit

 

History

History
232 lines (177 loc) · 6.57 KB

Remove-AzCognitiveServicesAccountNetworkRule.md

File metadata and controls

232 lines (177 loc) · 6.57 KB
external help file Module Name online version schema
Microsoft.Azure.PowerShell.Cmdlets.CognitiveServices.dll-Help.xml
Az.CognitiveServices
2.0.0

Remove-AzCognitiveServicesAccountNetworkRule

SYNOPSIS

Remove IpRules or VirtualNetworkRules from the NetWorkRule property of a Cognitive Services account

SYNTAX

NetWorkRuleString (Default)

Remove-AzCognitiveServicesAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String>
 -VirtualNetworkResourceId <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

IpRuleObject

Remove-AzCognitiveServicesAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String>
 -IpRule <PSIpRule[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]

NetworkRuleObject

Remove-AzCognitiveServicesAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String>
 -VirtualNetworkRule <PSVirtualNetworkRule[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

IpRuleString

Remove-AzCognitiveServicesAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String>
 -IpAddressOrRange <String[]> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The Remove-AzCognitiveServicesAccountNetworkRule cmdlet removes IpRules or VirtualNetworkRules from the NetWorkRule property of a Cognitive Services account

EXAMPLES

Example 1: Remove several IpRules with IPAddressOrRange

Remove-AzCognitiveServicesAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "myaccount" -IpAddressOrRange "10.0.0.0/24,28.1.0.0/16"

This command remove several IpRules with IPAddressOrRange.

Example 2: Remove a VirtualNetworkRule with VirtualNetworkRule Object input with JSON

Remove-AzCognitiveServicesAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "myaccount" -VirtualNetworkRule (@{VirtualNetworkReourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"})

This command remove a VirtualNetworkRule with VirtualNetworkRule Object input with JSON.

Example 3: Remove first IpRule with pipeline

(Get-AzCognitiveServicesAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "myaccount").IpRules[0] | Remove-AzCognitiveServicesAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "myaccount"

This command remove first IpRule with pipeline.

Example 4: Remove several VirtualNetworkRules with VirtualNetworkResourceID

Remove-AzCognitiveServicesAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "myaccount" -VirtualNetworkResourceId "/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"

This command remove several VirtualNetworkRules with VirtualNetworkResourceID.

PARAMETERS

-DefaultProfile

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

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

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

-IpAddressOrRange

Cognitive Services Account NetworkRule IpRules IpAddressOrRange in string.

Type: System.String[]
Parameter Sets: IpRuleString
Aliases:

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

-IpRule

Cognitive Services Account NetworkRule IpRules.

Type: Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSIpRule[]
Parameter Sets: IpRuleObject
Aliases:

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

-Name

Cognitive Services Account Name.

Type: System.String
Parameter Sets: (All)
Aliases: CognitiveServicesAccountName, AccountName

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

-ResourceGroupName

Resource Group Name.

Type: System.String
Parameter Sets: (All)
Aliases:

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

-VirtualNetworkResourceId

Cognitive Services Account NetworkRule VirtualNetworkRules VirtualNetworkResourceId in string.

Type: System.String[]
Parameter Sets: NetWorkRuleString
Aliases: SubnetId, VirtualNetworkId

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

-VirtualNetworkRule

Cognitive Services Account NetworkRule VirtualNetworkRules.

Type: Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSVirtualNetworkRule[]
Parameter Sets: NetworkRuleObject
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

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

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

CommonParameters

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

INPUTS

System.String

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSIpRule[]

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSVirtualNetworkRule[]

OUTPUTS

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSVirtualNetworkRule

Microsoft.Azure.Commands.Management.CognitiveServices.Models.PSIpRule

NOTES

RELATED LINKS