As we all know the capability of the TSM/SP scripting language is “limited”, not to say very poor. So (i assume) all TSM/SP admins have created a bunch of external scripts using bash, perl or even powershell to monitor and manage TSM/SP. The problem with such scripts is indeed, they are not controlled by TSM/SP itself and therefore they will also run if a server is in maintenance as they consist of commands run using the admin CLI and so they are treated as if an admin has issued them manually
Unfortunately the IBM got many times the feedback to improve the scripting capability, but does not do it.
Already 2008 this problem was mentioned on the ADSM-L mailing list, and also that time a workaround was provided: