I have the following script to shut down a bank of machines. It runs from the editor but not when saved as a script or app. It also runs as a QuicKeys script, so that's my workaround. But why? TIA.

set machNum to "11"
repeat 7 times
	set machNum to (machNum + 1) as string
	set remoteMachine to "eppc://pge:[log in to unmask]" & machNum
	using terms from application "Finder"
		tell application "Finder" of machine remoteMachine to shut down
	end using terms from
end repeat