SharePoint – Retrive the internal column name for lists/libraries using PowerShell

I have been using this method for some time now and decided to make a slight change to it. I have been using the PowerShell method found here to find the internal column names for my lists and libraries. It works great. The only problem with this is that I have to modify the script each time I need to change the value of the list or site. This is usually not a big deal since I generally am only looking at one list. This was not the case the other day. I needed to look at many different lists in the same site. Instead of having to modify the script each time, I added a set of parameters to prompt me at the command line. The code looks like this: