Justin Cooksey

What began as a task just to export all Sites from a DatoRMM instance to a CSV file, has started me down the path of building a module to deal with many of the DattoRMM API end points.

Mainly working around the REST APIs that I needed to use to perform certain tasks, I've begun refactoring the export code to become more of an API interface module which may grow to be more useful. Other tasks may take my time away from this, but I will see were it may go.

The original code to export of sites is here DattoRMM-Site-Export. Currently this code pulls all Sites from a DattoRMM environment and exports the basic details in to CSV format file. It removes the system sites called Managed, OnDemand & Deleted Devices, so that you only get an export of the customer base.

Also in the repo is code to set Site variables in DattoRMM sites read in from a csv, as this was part of the next steps I needed to take.

Gets the API URL, Key and Secret from .env or environment variables (example below)

Functions to interact with the DattoRMM API are in the dattormmapi.py Python file.

Main function to do the API requests and export to CSV is in the export_sites.py Python file.

Refactoring to make this a more versatile module to handle interactions with the DattoRMM API will go in to a new GitHub repo, which I'll make public once its formed up some more.

Justin Cooksey

I recently ran in to an issue where I needed to convert a reasonably large DHCP database from a Windows Server in to a Cisco CLI to allow the Cisco to take over DHCP roles for a subnet. I found nothing that realy automated this task, even using the exported XML file. So knowing that this was the second time I needed the tool, and likely to need it again, even if it was for smaller tasks, I set about coding it in Powershell. It is the scripting system well supported in Windows land.

The current version of the script can be found on my GitHub repository: Convert-WindowsDHCPToCisco

Still ha smany DHCP options that it hasn't been setup to hanle at this point but it does follow the basic ones that most of us use.

Currently handles DHCP Options

Code Option Description Cisco Output
3 Default Gateway default-router
4 Time Server ignoring
6 Domain Nameserver dns-server
15 Domain Name domain-name
42 NTP Servers option 42 ip
51 Lease time ignoring
66 TFTP Server next-server
67 Boot filename bootfile
81 MS DHCP Name Protection ignoring
121 Static routes option 121 hex
161 FTP Server option 161 ip
162 Path option 162 ascii
252 Proxy PAC URL option 252 asicc

DHCP References Used