< Back

Set-AzureRmSqlServerDnsAlias

Tue Jan 29, 2019 10:10 pm

NAME Set-AzureRmSqlServerDnsAlias



SYNOPSIS

Modifies the server to which Azure SQL Server DNS Alias is pointing





SYNTAX

Set-AzureRmSqlServerDnsAlias [-ResourceGroupName] <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] -Name <String> -SourceServerName

<String> -SourceServerResourceGroupName <String> -SourceServerSubscriptionId <Guid> -TargetServerName <String> [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

This command is updating the server to which alias is pointing.



This command needs to be issued while logged into subscription where new server to which alias is going to point is located.





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



-Name <String>

The Azure Sql Server Dns Alias name.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

The name of the resource group.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SourceServerName <String>

The name of Azure Sql Server to which alias is currently pointing.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SourceServerResourceGroupName <String>

The name of resource group of the source server.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SourceServerSubscriptionId <Guid>

The subscription id of the source server



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-TargetServerName <String>

The name of Azure Sql Server to which alias should point.



Required? true

Position? named

Default value None

Accept pipeline input? False

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







OUTPUTS

Microsoft.Azure.Commands.Sql.ServerDnsAlias.Model.AzureSqlServerDnsAliasModel







NOTES









Example 1



PS C:\\> Set-AzureRmSqlServerDnsAlias -ResourceGroupName rg -DnsAliasName aliasName -TargetServerName newServer -SourceServerName oldServer

-SourceServerResourceGroupName SourceServerRG -SourceServerSubscriptionId 0000-0000-0000-0000



This command is updating alias which was previously pointing to oldServer to point to server newServer







RELATED LINKS

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