Category Archives: Personal Projects

GitHub Gists and other snippets

I’m making more of an effort to post useful snippets of PowerShell and other stuff, like custom ADMX templates to either my GitHub Gists, or to a GitHub repository I’ve set up for miscellaneous bits and bobs.

As I’ve improved with PowerShell, it’s become easier to write generalised scripts, rather than highly targeted ones, so that I can solve similar problems, or share pieces of scripts around more easily.

If you’d like to learn more about Windows PowerShell check out PowerShell.org and the PowerScripting Podcast, they are nice friendly places that are easy to navigate and full to the brim with good content.

Backup DHCP Logs with Powershell

I’ve uploaded another little Powershell script to GitHub, as a module this time!

It’s called backupDhcpLogs and it tries to do what it says on the tin. Of course, if you couldn’t read the tin, it’s a module to back up DHCP logs.

Currently it backs up the previous days of logs to a destination you specify and will also remove logs from the destination that are older than a number of days you specify. There is also the option to back up the DHCP server configuration if you so wish.

However, I’ve got some more work to do on it. I’d like to offer an option to back up all the logs that exist, while managing them in the same way. Additionally, I would also like to offer a slightly more modern backup method using ‘Export-DhcpServer’ or ‘Backup-DhcpServer’, and not ‘netsh’.

I also had to remove a check for the DHCP Server Windows feature from the module, as it was stopping it from running when using the ‘Run whether the user is logged in or not’ option in the task scheduler. It’s something I’ll figure out eventually, then put the functionality back in.

Changing the ‘Howdy, user’ on the toolbar for WordPress

I haven’t been doing much on here in the way of computing lately, so to get back to it, here’s a WordPress plugin I wrote to get a better idea of how the plugin settings API works.

It’s very basic, all it does is change the ‘Howdy’ text in the toolbar (front and backend) to whatever you want by altering the toolbar by injecting the new greeting.

It was good fun to write, so here it is!

WP-AlterHowdy