Issue application command line interface commands from powershell RRS feed

  • Question

  • Hello, I currently have many vb scripts that issue application (TSM - Tivioli Storage Manager) commands against its activity log. The command contains the program name, ID, password, parms, and the location to write the data. For instance:

    objshell.run "dsmadmc -id=abc -pass=xyz -displaymode=list -tab q act begint=-1 msg=" & message_number & " > d:\dailyfolders\last-hour-error-messages\error-messages-in-the-last-hour-" & whole_message_number & ".txt",0,true

    message_number   and   whole_message_number   are variables it pulls from an input file.

    It then interrogates the created file and sends an email depending on what it does or does not find.

    Can this be done using powershell?  As I'm brand spanking new to powershell, if this can be done, can you give some pointers to get me started.

    Thank you!

    • Edited by 123rdemaat Monday, September 12, 2016 6:23 PM
    • Moved by Bill_Stewart Tuesday, October 18, 2016 2:11 PM Poor quality question/shows no research effort
    Monday, September 12, 2016 6:20 PM

All replies

  • Hi,

    All that VBScript command does is run another command, so yes PowerShell can do this.

    You'd need to start at the beginning to get anywhere with this, so I suggest looking over the resources here:


    Monday, September 12, 2016 6:35 PM
  • Ok. Thank you Mike!
    Monday, September 12, 2016 6:39 PM
  • Cheers, you're welcome. If you run into problems along the way please feel free to start up a new thread, post your code and errors, and we can go from there.

    Good luck.

    Monday, September 12, 2016 7:05 PM