Office 365 built in DNS records export powershell

sword_9mm

Ars Legatus Legionis
22,802
Subscriptor
Anyone familiar with the built-in O365 dns and how to export the records?

Trying to find some guidance on what service to connect to, and what commands can even export the DNS records to a csv. I'm going the connect-msolservice route but a lot of the commands that are documented don't seem available even as a global admin in Azure.

I'm not NEW to powershell but I'll admin using it in the cloud makes me super angry since there seems to be documentation for a lot of stuff that just doesn't work anymore. Or I'm looking in the wrong direction. I can't seem to find a good 'for dummies' type thing that spells this stuff out. Just doing the google thing that pulls up a bunch of conflicting MS documentation as well as old threads where nothing works anymore.

Any help would be great.. :)
 

sword_9mm

Ars Legatus Legionis
22,802
Subscriptor
The one I 'think' I may need is 'Get-MsolDomain -Name "domain.com"' but -name isn't a parameter at least in my session.

No real clue if that's the command I need since I'm not finding any good get-dns or something similar. It COULD be that O365 dns isn't something that can be manipulated and has to be dealt with through the GUI (which doesn't allow export for some dumb reason). From what I understand using Azure DNS is preferable but I'm not re-inventing that wheel.
 

sryan2k1

Ars Legatus Legionis
44,493
Subscriptor++
I've never met anyone who used O365 DNS.

All of the powershell stuff supports tab completion, you can just do "Get-MsolDomain -" and start hitting tab to cycle through, the parameter you want is DomainName, or you can just omit that entirely and give it the domain.

MSOL though is only going to be about auth/federation. According to google there is no way to export the records.
 

sword_9mm

Ars Legatus Legionis
22,802
Subscriptor
I've never met anyone who used O365 DNS.

All of the powershell stuff supports tab completion, you can just do "Get-MsolDomain -" and start hitting tab to cycle through, the parameter you want is DomainName, or you can just omit that entirely and give it the domain.

MSOL though is only going to be about auth/federation. According to google there is no way to export the records.

Yeah it was setup through O365 when I started with the company and we have a team of 2 engineers so yeah. I just left it in O365.

The completion -name doesn't work but MS says it does. Some of the commands sadly need whatever elevated priviledges which is really dumb. I'd rather have the command show up and just error if I don't have permission instead of not even being there..
 

sword_9mm

Ars Legatus Legionis
22,802
Subscriptor
Nothing that deals with any of the online services require admin since they're not doing anything locally that would require it. -Name likely got renamed to -DomainName at some point (or their documentation is just wrong). The parameter being available has no bearing on admin/non-admin.


Actually yes. Some parameters will not show up unless you have the correct permissions. Got bitten by that a few times in Exchange online.

We're a full Azure/O365 shop so if you're living in hybrid that may not apply.