How did you start the script ?
Did you do
powershell .\report.ps1 vc1
from a CMD prompt while positioned in the folder where the report.ps1 file is stored ?
This script was made for you to run passing it your VI Server as an input to the script, you should not need to ammend the code at all.
As LucD says just run the script like so:
PS> .\report.ps1 vc1
Or if you are loading it into something like powergui script editor type your VI server name in the text box next to the play button.
Sorry for the confusion.