Adding SQL Aliases Powershell Style

Script it, then walk away...

Script it, then walk away…

So once again I missed my post goal. I think at this point I’m no longer going to hold myself to it, since clearly real life has a way of getting in the…way. I ended up getting more gigs and needing to work on music, as well as a huge surge in my consulting business. So needless to say, although I am saying it, I wanted to post but I didn’t.

Moving right along, I thought I would post a powershell script that I cobbled together that allows you to programatically add SQL server aliases to the registry. Thanks to Neils Grove-Rasmussen for doing all the heavy lifting :). I added the capability to read in the servers from CSV and add multiple aliases in one swoop. I hope some of you kind find this to be useful, I know for myself when we have new computer configurations or new employees, it can be a PITA to add aliases for 100 servers. This way you can have a source controlled csv and just run the powershell script to add them all.

Check out the script on github

Cheers

Leave a Reply

Your email address will not be published. Required fields are marked *