< Back

Remove-AzureRmStorageAccountNetworkRule

Tue Jan 29, 2019 10:11 pm

NAME Remove-AzureRmStorageAccountNetworkRule



SYNOPSIS

Remove IpRules or VirtualNetworkRules from the NetWorkRule property of a Storage account





SYNTAX

Remove-AzureRmStorageAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>]

-IPAddressOrRange <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmStorageAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] -IPRule

<PSIpRule[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmStorageAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>]

-VirtualNetworkResourceId <String[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Remove-AzureRmStorageAccountNetworkRule [-ResourceGroupName] <String> [-Name] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>]

-VirtualNetworkRule <PSVirtualNetworkRule[]> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Remove-AzureRmStorageAccountNetworkRule cmdlet removes IpRules or VirtualNetworkRules from the NetWorkRule property of a Storage account





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IPAddressOrRange <String[]>

The Array of IpAddressOrRange, will remove IpRule with same IpAddressOrRange from the NetWorkRule Property.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IPRule <PSIpRule[]>

The Array of IpRule objects to remove from the NetWorkRule Property.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Name <String>

Specifies the name of the Storage account.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group contains the Storage account.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VirtualNetworkResourceId <String[]>

The Array of VirtualNetworkResourceId, will remove VirtualNetworkRule with same VirtualNetworkResourceId from the NetWorkRule Property.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VirtualNetworkRule <PSVirtualNetworkRule[]>

The Array of VirtualNetworkRule objects to remove from the NetWorkRule Property.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

Microsoft.Azure.Commands.Management.Storage.Models.PSIpRule[] Microsoft.Azure.Commands.Management.Storage.Models.PSVirtualNetworkRule[]





OUTPUTS

Microsoft.Azure.Commands.Management.Storage.Models.PSVirtualNetworkRule

Microsoft.Azure.Commands.Management.Storage.Models.PSIpRule





NOTES









Example 1: Remove several IpRules with IPAddressOrRange



PS C:\\>Remove-AzureRmStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -AccountName "mystorageaccount" -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



PS C:\\>Remove-AzureRmStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -AccountName "mystorageaccount" -VirtualNetworkRules

(@{VirtualNetworkReourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1";Action="allow"})



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





Example 3: Remove first IpRule with pipeline



PS C:\\>(Get-AzureRmStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -AccountName "mystorageaccount").IpRules[0] |

Remove-AzureRmStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount"



This command remove first IpRule with pipeline.





Example 4: Remove several VirtualNetworkRules with VirtualNetworkResourceID



PS C:\\>Remove-AzureRmStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -AccountName "mystorageaccount" -VirtualNetworkResourceId "/sub

scriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","/subscriptions/s1/resourceGroups/g1/providers/M

icrosoft.Network/virtualNetworks/vnet2/subnets/subnet2"



This command remove several VirtualNetworkRules with VirtualNetworkResourceID.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... etworkrule