Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Add-AzDelegation

Adds a delegation to a subnet.

Syntax

Default (Default)

Add-AzDelegation
 -Name <String>
 -ServiceName <String>
 -Subnet <PSSubnet>
 [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]

Description

The Add-AzDelegation cmdlet adds a service delegation to an Azure subnet.

Examples

Example 1: Adding a delegation

$vnet = Get-AzVirtualNetwork -Name "myVNet" -ResourceGroupName "myResourceGroup"
$subnet = Get-AzVirtualNetworkSubnetConfig -Name "mySubnet" -VirtualNetwork $vnet
$subnet = Add-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Sql/servers" -Subnet $subnet
Set-AzVirtualNetwork -VirtualNetwork $vnet

The first command retrieves the virtual network on which the subnet lies. The second command isolates out the subnet of interest - the one which you want to delegate. The third command adds a delegation to the subnet. This particular example would be useful when you want to enable SQL to create interface endpoints in this subnet. The final command sends the updated subnet to the server to actually update your subnet.

Parameters

-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

-Name

The name of the delegation

Parameter properties

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

Parameter sets

-ServiceName

The name of the service to which the subnet should be delegated

Parameter properties

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

Parameter sets

-Subnet

The subnet

Parameter properties

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

Parameter sets

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

PSSubnet

Outputs

PSSubnet

Related Links


Feedback

Was this page helpful?