I have been trying to run a couple of dos commands with in powershell. I need to run a couple of TSMVE commands on a bunch of servers.
TSMVE commands
Change directory to 1 utf-8
0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4C:\Program Files\Tivoli\TSM\baclient
run this command
dsmc set password -type=vm servername AD\username password -optfile=t:\TSMVE_Jobs\servername.opt
Then on some server we can run this command. My other issue is that I have quotes within quotes. So I'm not sure quotes within quotes with my varaible $cmdLineBSCHED.
1 utf-8
0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4dsmcutil inst scheduler /name:"TSM-serveraname-Backup-Scheduler" /node:servername/password:password /clientdir:"c:\program files\tivoli\tsm\baclient" /optfile:"D:\TSM_Jobs\servername_Backup_dsm.opt" /autostart:Yes
$tool="cmd.exe C:\Program Files\Tivoli\TSM\baclient"
$cmdLineSVC = "dsmc set password -type=vm" + " " + $VMCHOST + " " + "ms\tsmve password -optfile=t:\TSMVE_Jobs\" + $servername + "_TSMVE_Proxy_dsm.opt"
$cmdLineBSCHED = "dsmcutil inst scheduler /name:" + ""TSM-"" + $SERVERNAME + "-Backup-Scheduler"" + "/node:" + $SERVERNAME + "/password:" + $DC + $servername + "/clientdir:""c:\program files\tivoli\tsm\baclient"" /optfile:""D:\TSM_Jobs\" + $SERVERNAME + "_Backup_dsm.opt"" /autostart:Yes"
###################### Creates TSVE Service #################
invoke-expression "$tool $cmdLineSVC"
################## Install Local Backup Scheduler #################
invoke-expression "$tool $cmdLineBSCHED"