Automate EMC Avamar Client Install
Ever needed to deploy multiple EMC Avamar clients without having a deployment management software like SCCM? Well I had this scenario happen last week during my installation of our new EMC Avamar Grids. Looking around I found very little on this subject, so once again I decided to figure out a solution myself.
The approach is very straight forward and quite rudimentary but it got the job done. Below are the steps I used and the way I performed the install. However, this can be adapted to your use case quite easily, and the PowerShell script could be expanded to include Active Directory queries for a server list and then run the install on each host.
1. Download PSExec from Sysinternals, and put it somewhere that is your path so it can be called from command window.
2. Download all the different Avamar clients you need put them in a directory called C:\Avamar (on the box you will run the script from). The ones I use are:
· Windows 32-bit (32bit.msi)
· Windows 32-bit/System State Install (SystemState.msi)
· Windows 64-bit (64bit.msi)
· Windows 32-bit SQL (32bit-sql.msi)
· Windows 64-bit SQL (64bit-sql.msi)
· Windows 32-bit Exchange 2003 (exchange2k3.msi)
· Windows 64-bit Exchange 2007/2010 (exchange2k7-2k10.msi)
You can name the files whatever you want, just make sure that they are set correctly in the PowerShell Script.
3. Go find the avregister.bat file located in the C:\Program Files\avs\bin directory and copy it to the C:\Avamar directory.
a. Edit the lines that reference “avagent” and change it to include the full path: “C:\Program Files\avs\bin\avagent.exe”
b. This is because when psexec.exe runs it needs absolute file paths.
4. Download the script and put it in your C:\Avamar directory, edit the script and change the $avamarUtilityNode variable to match your Avamar Utility Node hostname. You can download the script by click here.
Let’s discuss how the script works. It’s actually quite simple. We created sub domains called /clients/production, /clients/staging, and /clients/development inside of Avamar. After the client install I wanted to make sure that my clients were activated in the correct Avamar domain, so after the script installs the necessary client it registers the server based on the location specification. The script usage looks like this:
Powershell.exe -file C:\Avamar\AvamarClientDeploy.ps1 –server <servername> -location <dev/stg/prd> -type <1/2/3/4/5/6>
·  = Windows 32-bit
·  = Windows 64-bit
·  = Windows 32-bit/SQL
·  = Windows 64-bit/SQL
·  = Windows 32-bit/Exchange
·  = Windows 64-bit/Exchange
powershell.exe –file c:\Avamar\AvamarDeploy.ps1 –server w2k8-server.domain.local –location prd –type 2
The reason I don’t read through/process a file of server names and do the install is because I wanted to deploy more than one at a time. I personally had about 200 devices to push this to, so I used good old Excel and batch files. See that process below.
The Use Case:
1. Verify all client files and the AvamarClientDeploy.ps1 files are in C:\Avamar.
2. Create an Excel document with your host names in Column A, locations in Column B, & types in Column C.
3. Add this code to column D and pull it down to all rows. Download sample here.
=(“powershell.exe -file C:\Avamar\AvamarClientDeploy.ps1 -server ” & A2 & ” -location ” & B2 & ” -type ” & C2)
4. Copy records into a batch file (I ended up creating 10 with 20 install commands in each).
5. Execute the batch files, watch for psexec result codes of 0. 1603 means the msi package had an issue installing, in my case it was because the client had already been installed.
6. Verify the activation took by checking your Avamar domains.
Hopefully this helps anyone out there needing to automate their Avamar client install. This isn’t the best walk through, but if you download the script you should be able to understand how the process works. FYI – I deployed 200 clients in about an hour, all successful.