Set-​Azure​Rm​Sql​Server

Modifies properties of a SQL Database server.

Syntax

Set-AzureRmSqlServer
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-SqlAdministratorPassword <SecureString>]
   [-Tags <Hashtable>]
   [-ServerVersion <String>]
   [-Force]
   [-WhatIf]
   [-Confirm]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

The Set-AzureRmSqlServer cmdlet modifies properties of an Azure SQL Database server.

Examples

Example 1: Reset the administrator password

PS C:\>$ServerPassword = "newpassword"
PS C:\> $SecureString = ConvertTo-SecureString $ServerPassword -AsPlainText -Force
PS C:\> Set-AzureRmSqlServer -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -SqlAdministratorPassword $secureString
ResourceGroupName        : ResourceGroup01
ServerName               : Server01
Location                 : Australia East
SqlAdministratorLogin    : adminLogin
SqlAdministratorPassword : 
ServerVersion            : 12.0
Tags                     :

This command resets the administrator password on the AzureSQL Server named server01.

Required Parameters

-ResourceGroupName

Specifies the name of the resource group to which the server is assigned.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

Specifies the name of the server that this cmdlet modifies.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Forces the command to run without asking for user confirmation.

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

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerVersion

Specifies the version to which this cmdlet changes the server. The acceptable values for this parameter are: 2.0 and 12.0.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SqlAdministratorPassword

Specifies a new password, as a SecureString, for the database server administrator. To obtain a SecureString, use the Get-Credential cmdlet. For more information, type Get-Help ConvertTo-SecureString.

Type:SecureString
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tags

Specifies a dictionary of tags that this cmdlet associates with the server.

Type:Hashtable
Aliases:Tag
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False

Outputs

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