I've ended up with a huge number of DNS records in my M365 account, and I have no idea how they got there. I'm guessing they were auto-generated when I switched from my old provider to Microsoft. I really don't need these records anymore, but the only way I see to delete them is one by one, which would take forever. Is there a PowerShell command or some other method to remove all these A records at once?
2 Answers
I haven't done this myself, but you could try using the Az PowerShell module. Here's a link that might help you get started: https://learn.microsoft.com/en-us/powershell/module/az.dns/remove-azdnsrecordset?view=azps-14.0.0. Just make sure you have the module installed and are logged into your Azure account. You might be able to bulk delete by looping through the records if they're in Azure DNS.
It's always good to double-check why you're deleting records. I've seen cases where customers lost important DNS entries when they moved ownership without understanding what each record was for. Just make sure you really don’t need any of those records before you start deleting.
Thanks for the heads up! But this is my own account, and I’ve used a dynamic IP service, so I know none of these records are critical for me.
I appreciate that! I think that PowerShell method is specific to Azure DNS, and my domains aren’t under that, but it’s a good start. Thanks!