< Back

New-AzureRmSqlServer

Tue Jan 29, 2019 10:09 pm

NAME New-AzureRmSqlServer



SYNOPSIS

Creates a SQL Database server.





SYNTAX

New-AzureRmSqlServer [-ResourceGroupName] <String> [-AsJob] [-AssignIdentity] [-DefaultProfile <IAzureContextContainer>] -Location <String>

-ServerName <String> [-ServerVersion <String>] -SqlAdministratorCredentials <PSCredential> [-Tags <Hashtable>] [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The New-AzureRmSqlServer cmdlet creates an Azure SQL Database server.





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-AssignIdentity [<SwitchParameter>]

Generate and assign an Azure Active Directory Identity for this server for use with key management services like Azure KeyVault.



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



-Location <String>

Specifies the location of the data center where this cmdlet creates the server.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group to which this cmdlet assigns the server.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

Specifies the name of the new server.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ServerVersion <String>

Specifies the version of the new server. The acceptable values for this parameter are: 2.0 and 12.0.



Specify 2.0 to create a version 11 server, or 12.0 to create a version 12 server.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SqlAdministratorCredentials <PSCredential>

Specifies the SQL Database server administrator credentials for the new server. To obtain a PSCredential object, use the Get-Credential

cmdlet. For more information, type `Get-Help Get-Credential`.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Tags <Hashtable>

Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



Required? false

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

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel







NOTES









Example 1: Create a new Azure SQL Database server



PS C:\\>New-AzureRmSqlServer -ResourceGroupName "ResourceGroup01" -Location "Central US" -ServerName "server01" -ServerVersion "12.0"

-SqlAdministratorCredentials (Get-Credential)

ResourceGroupName : resourcegroup01

ServerName : server01

Location : Central US

SqlAdministratorLogin : adminLogin

SqlAdministratorPassword :

ServerVersion : 12.0

Tags :



This command creates a version 12 Azure SQL Database server.







RELATED LINKS

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

Get-AzureRmSqlServer

Remove-AzureRmSqlServerAuditing

Set-AzureRmSqlServerAuditingPolicy

New-AzureRmSqlServerFirewallRule

SQL Database Documentation https://docs.microsoft.com/azure/sql-database/