Scripting in Windows Powershell or CMD - Quotes

FloXXI

ADSM.ORG Member
Joined
Jul 25, 2012
Messages
19
Reaction score
0
Points
0
hi all,

i tried to do some tsm scripting in windows powershell/cmd, but i have issues using quotes.

when i try to run the following command in powershell or cmd

.\dsmadmc.exe -id=admin -password=xyz123 define schedule Admin01 type=administrative cmd="query process" active=yes starttime=now

i always get the error

ANS8000I Server command: 'define schedule Admin01 type=administrative cmd=query process active=yes starttime=now'
ANR2004E Missing value for keyword parameter - process.
ANS8001I Return code 3.
ANS8002I Highest return code was 3.

i already tried using

.\dsmadmc.exe -id=admin -password=xyz123 define schedule Admin01 type=administrative cmd="`"query process`"" active=yes starttime=now

but the result is just the same.

is anybody experienced with scripting tsm in windows powershell or cmd an may help me how to use the quotes?

thank you
 
I am not an expert with Powershell or windows scripting but have you tried just single quotes?

.\dsmadmc.exe -id=admin -password=xyz123 define schedule Admin01 type=administrative cmd='query process' active=yes starttime=now
 
Use this:

.\dsmadmc.exe -id=admin -password=xyz123 "define schedule Admin01 type=administrative cmd='query process' active=yes starttime=now"
 
Thanks moon-buddy! It works like that. :)

.\dsmadmc.exe -id=admin -password=xyz123 "define schedule Admin01 type=administrative cmd='query process' active=yes starttime=now"
 
Back
Top