I see single quotation at the end of command ...saturday'. I do not think it is correct.
I think you can try to use next syntax: 'c:\windows\system32\windowspowershell\v1.0\powershell.exe "c:\program files\tivoli\tsm\ba\bin\powershell.ps1" e saturday' It means use single quotation for command and double quotation for script name. In this case, double quotation will be removed by scheduler during startup. Maybe it will help. By the way, I do not think you will be able to run scripts with spaces in the path. Some time ago I was fighting with this problem for a long time and, finally, moved scripts to directory without spaces in the path. This is the fastest way to resolve problem. Grigori G. Solonovitch -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of S.Kirk Sent: Wednesday, April 06, 2011 11:19 AM To: ADSM-L@VM.MARIST.EDU Subject: Re: [ADSM-L] Problem running a script from TSM client Hi, Thanks for the reply. I'm alrady giving the full path to the powershell.exe and to the script that should be executed. I'm quoting the path as it does indeed contain spaces. Here is an example of the command: '"c:\windows\system32\windowspowershell\v1.0\powershell.exe c:\program files\tivoli\tsm\ba\bin\powershell.ps1" e saturday' I believe that's the correct path to the powershell.exe, however I'm not connected to the box to check it at the moment. Having had a read of your excellent FAQ, it sounds like my best option is to add the following to the client dsm.opt: SCHED See what's happening in Scheduler work, as in debugging a POSTSchedulecmd command not getting run. Regards, Steve -----Original Message----- From: ADSM: Dist Stor Manager [mailto:ADSM-L@vm.marist.edu] On Behalf Of Richard Sims Sent: 31 March 2011 13:15 To: ADSM-L@vm.marist.edu Subject: Re: [ADSM-L] Problem running a script from TSM client When you run a command from your shell command line, the prevailing PATH spec allows finding the command. Background tasks may not have such PATH information. It is essential that OS environment commands used in pre/postschedule commands employ full paths to assure finding the command. When a command is not found, the common result is return code 1. And if that full string contains spaces, quoting is necessary, as specified in the client manual. Richard Sims http://people.bu.edu/rbs Please consider the environment before printing this Email. ________________________________ CONFIDENTIALITY AND WAIVER: The information contained in this electronic mail message and any attachments hereto may be legally privileged and confidential. The information is intended only for the recipient(s) named in this message. If you are not the intended recipient you are notified that any use, disclosure, copying or distribution is prohibited. If you have received this in error please contact the sender and delete this message and any attachments from your computer system. We do not guarantee that this message or any attachment to it is secure or free from errors, computer viruses or other conditions that may damage or interfere with data, hardware or software.