You will forgive me if I sound a bit suspicious, but I regret to say that we regularly get questions from students/schoolkids asking how to play various "pranks" on other users of their school or college's computer equipment. These pranks include such "exploits" as popping open CD trays, deleting files, logging users off, and (guess what?) shutting down the computer.
Often remote shutdowns are deliberately disabled in school computers. Even if they are not, in a well set up and run system, in general, only system admins have the power to shut down PCs remotely. If you are one of the students, you will not have that privilege, and the attempt will fail, as you have found.
People wondering about such pranks should note that (a) irresponsible use of public, educational or business IT systems and/or (b) bypassing security or other system restrictions are not encouraged by Computerhope, and I believe that it is contrary to forum policy to give advice on how to do these things.