I also got the line errors
when you copy and paste the script from the webbrowser (firefox in my case) into SSMS it does not seem to work.
I have now copied and pasted the text into notepad++ which revealed many of the spaces are defined as square boxes which normally refer to unrecognised text.
By doing a search and replace on all these square boxes and replacing them with a spacebar character, then copying and pasting this from notepad ++ into SSMS worked just fine.
This is a useful script for SQL Admins that if implemented correctly could help them check or even warn them when their SQL servers run out of disk space. However I normally find most organisations that run sql servers, also run other non sql servers and will have some means of monitoring disk space on all the servers.
Writing your own to monitor disk space, whilst fun, might suggest you have already been at the short end of the stick because they have not warned you about disk space shortage and you had a server stop responding because of lack of disk space.
As other servers on the network are quite often also bussiness critical, I would think it makes more sense ensuring the tool used for monitoring disk space accross the board (not just sql servers) is used instead.
Alternatively, since you are using cmdshell, why not setup scheduled tasks on all servers (not just SQL) that run at regular intervals, running batch files to collect the same information and placing it into one SQL server where reporting services can be used to send you a regular email of all servers (not just SQL) where disk space is below either 1GB or 1% of capacity.