Bearbeiten

Freigeben über


Set-AzPrivateDnsVirtualNetworkLink

Updates/Sets a virtual network link associated with a private zone and a resource group.

Syntax

Set-AzPrivateDnsVirtualNetworkLink
   -ResourceGroupName <String>
   -ZoneName <String>
   -Name <String>
   [-IsRegistrationEnabled <Boolean>]
   [-ResolutionPolicy <String>]
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzPrivateDnsVirtualNetworkLink
   -InputObject <PSPrivateDnsVirtualNetworkLink>
   [-IsRegistrationEnabled <Boolean>]
   [-ResolutionPolicy <String>]
   [-Tag <Hashtable>]
   [-Overwrite]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzPrivateDnsVirtualNetworkLink
   -ResourceId <String>
   [-IsRegistrationEnabled <Boolean>]
   [-ResolutionPolicy <String>]
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzPrivateDnsVirtualNetworkLink cmdlet updates a link associated with a zone from a specified resource group. You can pass a PSPrivateDnsVirtualNetworkLink object using the Link parameter or by using the pipeline operator, or alternatively you can specify the Name ZoneName and ResourceGroupName parameters. You can use the Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for confirmation. When specifying the zone using a PSPrivateDnsVirtualNetworkLink object (passed via the pipeline or Link parameter), the link is not updated if it has been changed in Azure DNS since the local PSPrivateDnsVirtualNetworkLink object was retrieved. This provides protection for concurrent link changes. This can be suppressed using the Overwrite parameter, which updates the link regardless of concurrent changes.

Examples

Set-AzPrivateDnsVirtualNetworkLink -ZoneName "myzone.com" -ResourceGroupName "MyResourceGroup" -Name "mylink" -Tag @{} -IsRegistrationEnabled $true

Name                    : mylink
ResourceId              : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.N
                          etwork/privateDnsZones/myzone.com/virtualNetworkLinks/mylink
ResourceGroupName       : MyResourceGroup
ZoneName                : myzone.com
VirtualNetworkId        : /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.N
                          etwork/virtualNetworks/myvirtualnetwork
Location                :
Etag                    : "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Tags                    : {}
RegistrationEnabled     : True
ResolutionPolicy        : Default
VirtualNetworkLinkState : Completed
ProvisioningState       : Succeeded

This command sets IsRegistrationEnabled to True for the link named mylink, linked to zone named myzone.com from the resource group named MyResourceGroup.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The virtual network link object to set.

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

-IsRegistrationEnabled

Boolean that represents if registration is enabled on the virtual network link.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the link that this cmdlet removes. You must also specify the ResourceGroupName and ZoneName parameter. Alternatively, you can specify the private DNS link using the link parameter.

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

-Overwrite

When specifying the link using a PSPrivateDnsVirtualNetworkLink object (passed via the pipeline or Link parameter), the link is not deleted if it has been changed in Azure DNS since the local PSPrivateDnsVirtualNetworkLink object was retrieved. This provides protection for concurrent link changes. This can be suppressed using the Overwrite parameter, which deletes the link regardless of concurrent changes.

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

-ResolutionPolicy

Speficies the resolution policy of the virtual network link

Type:PrivateDnsResolutionPolicy
Accepted values:Default, NxDomainRedirect
Position:Named
Default value:Default
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of the resource group that contains the link to remove. You must also specify the ZoneName and Name parameter. Alternatively, you can specify the virtual network link using a PSPrivateDnsVirtualNetworkLink object, passed via either the pipeline or the Link parameter.

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

-ResourceId

Private DNS Zone ResourceID.

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

-Tag

A hash table which represents resource tags.

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

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ZoneName

Specifies the name of the DNS zone that this cmdlet removes. You must also specify the Name and ResourceGroupName parameter. Alternatively, you can specify the private DNS link using the link parameter.

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

Inputs

PSPrivateDnsVirtualNetworkLink

String

Outputs

PSPrivateDnsVirtualNetworkLink