Write a script to have powershell run TSM and restore a file

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 5 months ago.

  • Author
    Posts
  • #5437

    by quallsa at 2013-01-15 09:01:48

    I'm trying to write a script to copy a bad file that created over a good file. Then have powershell execute the TSM dsmc.exe, and restore the original good file. Then show me the output of the good file. The script below is what I have so far but its not working.

    cp C:\Badfile.txt C:\Backuptest.txt
    #
    #
    Invoke-Command C:\Program Files\Tivoli\TSM\baclient\dsmc.exe ""
    #
    #
    $Backuptest = Get-Content C:\Backuptest

    Can anyone help me with this?

    by nohandle at 2013-01-15 10:12:03

    [quote="quallsa"]but its not working.[/quote]
    This needs more detail. What it does? What is should do? Do you get any exceptions?

    Does the command work for you in the old cmdline? If so, how does the command you run look exactly?

You must be logged in to reply to this topic.