You have to run that from the SQL Server itself. There’s a thread here somewhere about SQL Maintenance scripts.
EDIT: Here it is