mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
22 lines
898 B
PowerShell
22 lines
898 B
PowerShell
Import-Module "Az.Resources"
|
|
|
|
######################################################################
|
|
# Prompt the user to enter the values of deployment parameters
|
|
######################################################################
|
|
|
|
$resourceGroupName = Read-Host -Prompt "Enter the resource group name"
|
|
$subscriptionId = Read-Host -Prompt "Enter your subscription id"
|
|
|
|
######################################################################
|
|
# Sign in to Azure
|
|
######################################################################
|
|
|
|
Connect-AzAccount
|
|
$context = Set-AzContext -Subscription $subscriptionId
|
|
|
|
######################################################################
|
|
# Delete the resource group
|
|
######################################################################
|
|
|
|
$location = (Get-AzResourceGroup -Name $resourceGroupName).Location
|
|
Remove-AzResourceGroup -Name $resourceGroupName |