Hi Erik Heeren
If you can access the Batch account, try to forcefully delete any pools or jobs associated with it:
az batch pool delete --account-name <YourBatchAccountName> --pool-id <YourPoolId> --yes
az batch job delete --account-name <YourBatchAccountName> --job-id <YourJobId> --yes
If the CLI and PowerShell commands are not working, you can try using the Azure Resource Manager REST API to forcefully delete the Batch account.
DELETE https://management.azure.com/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Batch/batchAccounts/<batchAccount>?api-version=2023-05-01
Also try this as well: Go to Azure Portal -> subscriptions -> your-subscription -> resource Groups -> your-resource-group -> providers -> Microsoft.Batch -> batchAccounts -> your-account. Check the properties section for any lingering metadata or child resources. If the DELETE button is available, try using it here, it sometimes bypasses portal/CLI restrictions.
Hope this helps!
Please Let me know if you have any queries.