2020-02-14 19:09:09 +03:00
|
|
|
param(
|
2025-02-18 13:28:37 +01:00
|
|
|
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName
|
2020-02-14 19:09:09 +03:00
|
|
|
)
|
|
|
|
|
|
2023-10-18 19:11:46 +02:00
|
|
|
$groupExist = az group exists --name $TempResourceGroupName
|
2020-02-14 19:09:09 +03:00
|
|
|
if ($groupExist -eq "true") {
|
|
|
|
|
Write-Host "Found a match, deleting temporary files"
|
2023-10-18 19:11:46 +02:00
|
|
|
az group delete --name $TempResourceGroupName --yes | Out-Null
|
2022-06-16 11:32:30 +02:00
|
|
|
Write-Host "Temporary group was deleted successfully"
|
2020-02-14 19:09:09 +03:00
|
|
|
} else {
|
|
|
|
|
Write-Host "No temporary groups found"
|
2023-10-18 19:11:46 +02:00
|
|
|
}
|