Skip to content

Instantly share code, notes, and snippets.

@vexx32
Created April 10, 2019 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vexx32/96ce0ffe20eec8357b5860e251180803 to your computer and use it in GitHub Desktop.
Save vexx32/96ce0ffe20eec8357b5860e251180803 to your computer and use it in GitHub Desktop.
$resourceGroup = "azure-rg"
$serverName = "azure-srv1"
$dbName = "azure01"
$params = @{
ResourceGroupName = $resourceGroup
ServerName = $serverName
}
$Backup = Get-AzSqlDatabaseGeoBackup @params
$Params.Add('DatabaseName', $dbName)
Get-AzSqlDatabaseRestorePoints @params |
Select-Object -Property @(
'ServerName'
'DatabaseName'
@{ Name = 'Edition'; Expression = {$Backup.Edition} }
@{ Name = 'LastAvailableBackupDate'; Expression = {$Backup.LastAvailableBackupDate} }
'Location'
'EarliestRestoreDate'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment