< Back

Get-AzureRmSqlServerDnsAlias

Tue Jan 29, 2019 10:08 pm

NAME Get-AzureRmSqlServerDnsAlias



SYNOPSIS

Gets or lists Azure SQL Server DNS Alias.





SYNTAX

Get-AzureRmSqlServerDnsAlias [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-Name <String>] -ServerName <String>

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





DESCRIPTION

Get the specific Azure SQL Server DNS Alias or lists all Server DNS Aliases for the server





PARAMETERS

-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? false

Position? named

Default value None

Accept pipeline input? False

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



-ServerName <String>

The Azure Sql Server name.



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:\\> $serverDNSAliases = Get-AzureRmSqlServerDNSAlias -ServerName servername -ResourceGroupName rgname



ResourceGroupName ServerName DnsAliasName

----------------- ---------- ------------------

rgname servername dnsaliasname

rgname servername dnsaliasname2



Lists all Server DNS Aliases for the specific server





Example 2



PS C:\\> $serverDNSAliases = Get-AzureRmSqlServerDNSAlias -DnsAliasName dnsaliasname -ServerName servername -ResourceGroupName rgname



ResourceGroupName ServerName DnsAliasName

----------------- ---------- ------------------

rgname servername dnsaliasname



Gets Server DNS Alias specified by server and alias name







RELATED LINKS

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