Skip to main content
Question

Custom package install using activeBatch Job to install on Windows machine

  • March 9, 2023
  • 2 replies
  • 143 views

Forum|alt.badge.img+1

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
 

2 replies

Alireza B
Vaulter
Forum|alt.badge.img+8
  • Vaulter
  • March 9, 2023

Hi. We cannot comment on or troubleshoot third party tools. If the package works fine outside of AB then most likely it’s something on the AB side.


Forum|alt.badge.img+7
  • Vaulter
  • March 10, 2023

@Evrard - Try adding some error checking to the powershell script.  Also, try running the ActiveBatch script only using one server and see if its successful. With the Wait-AbatJob I would suspect that the job will be waiting for the first server install to complete, but your piping two names.