I created a custom Package to install the commvault agent on a window machine. I’m planning on using ActiveBatch to run the job. When I run the custom package from the window machine manually and it install. However, when I attempt to us the ActiveBatch job it’s not installing. Below is the script used for the AB Job.
$servers = "${server}"
foreach($s in $servers.split(','))
{
$servername = $s + ".aptproduction.com"
New-Item "\\$servername\c$\temp\commvault\" -Type Directory
Copy-Item \\backup02s\mdt\Applications\Commvault\CommvaultAgentStl.exe \\$servername\c$\temp\commvault\
icm $servername {Start-Process -filepath c:\temp\commvault\commvaultagentstl.exe -argumentlist "/silent /install /silent" -Wait}
Remove-Item \\$servername\c$\temp\commvault\ -Recurse -Force
}
Below is the command we use to start the activeBatch job. neither of those work.
$server = 'server1,server2'
Start-AbatJob -JobScheduler Activebatch -ObjectKey "/Commvault/Install agent STL" -Variables "server=$server" | Wait-AbatJob | Select Key,State