Fetch DNS scavenged records with help of powershell

1 comments
After enabling DNS Scavenging successfully in our infrastructure. It was huge pain to know what all DNS records have been scavenged. So, i wrote up a script to gather all information about scavenging and all scavenged records, then create a report for me and email me every Monday morning because Sunday is our scavenging day.

I am going to explain what all things will this script do for you and how can it be useful for your work.

Whenever DNS Scavenging happens, it generates two events, 2501 and 2502.
Event Id 2501 generates when DNS scavenging runs automatically. And the script which i created mainly uses 2501 event because DNS scavenging is configured to run automatically.
Event Id 2502 is same as 2501 and has all together information. But it generates when you run scavenging manually.

You will find both of these events under Event Viewer > Applications and Services Logs > DNS Server.

Domain Controller System State Backup (Server 2016)

0 comments
I recently schedule domain controller (PDC) system state backup to repeat the backup task every first Sunday of a month. I wrote up a script using new powershell windows backup commands. Commands are really good rather using old legacy command prompt utilities.

You can read the script from below attached screenshot. If you want to download it, you will find its link below the image.

Note: Make sure you install Windows backup feature first. Else these commands will not work.