Category: PowerShell

  • PowerShell Regex Matching

    I was working on a project where I needed to understand the naming convention for the servers. Since they had been made by several teams over several years, there was no convention. It was a giant pain in the ass. I wrote a function that would accept the server name and then try to parse…

  • parse array for valid usernames

    I was helping a colleague with a list of email addresses and trying to get a valid username out of it. He is going to get a list of emails every week so writing a script to parse it out for him seemed the best idea. This is only part of the process; there are…

  • Make Link List with PowerShell

    A script to get a list of links off a given page. I found these two examples to start from: http://normansolutions.co.uk/post/using-powershell-to-check-all-pages-in-website, https://www.petri.com/testing-uris-urls-powershell. I wrote this with an understanding of what the links look like on this page, so the function formats them with the given URL.

  • Using Google domains with a dynamic IP

    This is a script to read the current public IP and update your Google domain with the new IP- Here is some documentation on Google on how to change your DNS via API- https://support.google.com/domains/answer/6147083. The short version is make a domain or subdomain dynamic. When you do this there will be a username and password generated for you,…

  • Setting time on Windows 2008

    I have my AD DC set the time for my network. Since it’s not really that good at keeping time I had to set the DC to pull the time from the govn’ment. I set all this via command line in Windows 2008. I would cite where I got this from but didn’t note it…