How to Move System Databases to a New Physical Directory

I was recently on a very challenging project where we had to do some SQL tasks that were both new to me as a DBA and proved to be challenging. I found myself doing certain tasks over and over. When this happens, I usually find myself automating, creating scripts or documenting. On this project, I did all three. I was constantly being tasked with having to move system databases on old or legacy SQL Servers to new storage locations. I am not going to get into why, it was just part of the tasks I needed to complete over and