Tag Archives: powershell module

PowerShell – Timezone Module (PSGallery)

Today, I published my first module to the PowerShell gallery!

It’s the fairly simple module I wrote to manage the timezone on the local machine, wrapping the tzutil command. It’s all really come together over the last couple of days (I  fixed a bunch of problems by writing some proper tests for it!). I’ve also been using it to work with a lot of cool stuff with it like advanced parameter completion, psake and PSDeploy to streamline the testing and deployment.

Some of these ideas came from things I saw recently on the PowerShell.org Global Summit videos (They are all incredible). I’m annoyed I couldn’t make it this time,  but the videos and the other awesome stuff people are doing with PowerShell getting out there is great!

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.