Jorge Serres (5/18/2014)
Just change column physical_memory_in_bytes with [physical_memory_kb/1048.576]!! otherwise it'll generate some blood!:-D
I am running SQL Server Enterprise 2012 SP1. I just changed the line in the quote above and it was good to go.
Thanks for the great script Patrick!