Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Restore-AzSqlServer
- Module:
- Az.Sql Module
Restores a deleted Azure SQL Database server that is still within its soft-delete retention period. (Server soft-delete feature is currently in Public Preview)
Syntax
Default (Default)
Restore-AzSqlServer
-ServerName <String>
-Location <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Restore-AzSqlServer cmdlet restores a deleted Azure SQL Database server that is still within its soft-delete retention period
Examples
Example 1
Restore-AzSqlServer -ResourceGroupName "resourcegroup01" -ServerName "server01" -Location "CentralUS"
ResourceGroupName : resourcegroup01
ServerName : server01
Location : centralus
SqlAdministratorLogin : SqlAdminUser
SqlAdministratorPassword :
ServerVersion : 12.0
Tags :
Identity :
FullyQualifiedDomainName : server01.database.windows.net
MinimalTlsVersion : 1.2
PublicNetworkAccess : Enabled
RestrictOutboundNetworkAccess : Disabled
Administrators :
PrimaryUserAssignedIdentityId :
KeyId :
FederatedClientId :
SoftDeleteRetentionDays : 7
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-Location
Location where the deleted server was originally located
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
The name of the resource group where the server will be restored. This must be the same resource group where the server was originally located before deletion.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ServerName
SQL Database server name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | Name |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
Outputs
AzureSqlServerModel
Related Links
Azure PowerShell
Feedback
Was this page helpful?
