I suggest you take a look at the prometheus wmi_exporter / windows_exporter <https://github.com/prometheus-community/windows_exporter>. This is focussed on collecting metrics, not doing DNS updates, but it may give you a starting point.
Note: windows_exporter is the newer version, and I think they've actually moved away from WMI in many of the collectors to use more efficient interfaces; but looking through the git history should tell you a lot. On Sunday, 7 February 2021 at 20:20:09 UTC Tom Limoncelli wrote: > I've been using Unix for decades (and Go since the pre-releases) and > now I find myself needing to use Go to talk to the Windows WMI system. > There isn't a lot of GO-specific documentation and I could use help > figuring out where to get started. Sadly google searches for getting > started with WMI are about as useful as learning to perform surgery by > googling for "broken bone". > > I'm trying to use WMI to talk to the Windows DNS Server. My MVP would > be to do the equivalent of adding an A or MX record to an existing DNS > zone (similar to > > https://docs.microsoft.com/en-us/windows/win32/dns/dns-wmi-provider-samples-managing-dns-resource-records > ) > > Can anyone point me in the right direction? What are the best > resources for learning WMI in general? > > Thanks in advance! > Tom > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/05f0a77c-3936-4f7f-bc22-77f764b3f5f4n%40googlegroups.com.