Automate EMC Avamar Client Install

This entry was posted by on Friday, 22 April, 2011 at

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.

The Setup:

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>

·         [1] = Windows 32-bit

·         [2] = Windows 64-bit

·         [3] = Windows 32-bit/SQL

·         [4] = Windows 64-bit/SQL

·         [5] = Windows 32-bit/Exchange

·         [6] = 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.

~Lane

18 Responses to “Automate EMC Avamar Client Install”

  1. Chris

    HI there.

    Whenever i go run the Bat file i end up getting a power message that tells me PSExec is not a recognized as the name of a cmdlet, function, script file

    I’m wondering what it is i’m doing wrong

    Many thanks

    • Lane

      Hi Chris,

      This script uses psexec to remotely run the install on the target. You can download this from the sysinternals URL http://technet.microsoft.com/en-us/sysinternals/bb897553. After you have downloaded the psexec.exe you need to put it in a spot that is in your PATH, e.g., C:\Windows\System32\. What I do is have a folder on my C:\ called apps and I just put the C:\apps\ directory in my PATH so that way any executable I want to be available regardless of where I am within the command processor or powershell I can call it.

      Here is an article describing how to set your windows path. http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

      thanks!

      ~Lane

      • Chris

        Hi Lane

        Thanks for your reply.

        I managed to resolve the PSExec issue by adding the path to where PSExec is within the powershell script (Even thou they are all in the same folder?)

        The big issue I’m getting now is the Register file. I simply can not get it to register the Agent. I’ve tried various commands etc and every time I get told that “AVAgent.exe is not recognized as an internal or external command, operable program or batch file”

        The services stop and start fine it just simply wont register?

        Cheers

  2. Chris

    Hi Lane

    Thanks for your reply.

    I managed to resolve the PSExec issue by adding the path to where PSExec is within the powershell script (Even thou they are all in the same folder?)

    The big issue I’m getting now is the Register file. I simply can not get it to register the Agent. I’ve tried various commands etc and every time I get told that “AVAgent.exe is not recognized as an internal or external command, operable program or batch file”

    The services stop and start fine it just simply wont register?

    Cheers

    • Lane

      Hi Chris,

      I’m sorry I haven’t gotten back to you yet. Did you perform this:

      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.

      You have to make sure and change your avagent.exe location within the avregister.bat file you are using to execute the registration.

      Please make sure you have modified the avregister.bat file as per the instructions and this should resolve your issue.

      thanks!
      ~Lane

  3. J

    Chris,

    In your instructions under “The Use Case” step 4 you mentioned that you copied your excel records into your bat file. How did you do this? I’ve made it all the way to this step and I’m a little confusued as to what you meant. Could you provided an example please ?

    Thanks
    James

    • Lane

      Hi James,

      All I’m doing here is copying the Batch File Command row out of the Excel document into an actual .bat file. This way I can run multiple batch files at the same time instead of waiting for each install command to run.

      So if you ended up having 60 servers in the excel document, you would also have 60 “Batch File Commands” (column D). I would copy the first 20 commands to a batch file called install1.bat, then take the next 20 commands and copy them to a batch filed called install2.bat, and so on. That way you can run install1.bat, install2.bat, etc… at the same time. This is my “cheap” way of multithreading the install.

      thanks!
      ~Lane

  4. J

    Also, if we didn’t create sub domains such as development, production, or staging do we need this piece of your script? We’ve basically dropped everything into domains/clients.

    Thanks again

    • Lane

      Hi James,

      If you are not using sub domains you need to modify the PowerShell script. The easiest way to do this is just open the AvamarClientInstall.ps1 file and edit line 15 to be “/clients” instead of “/clients/development”. Then in your excel document just make the server location for all of our clients dev.

      I hope this helps!

      thanks!
      ~Lane

  5. Wayne

    Starting in Jan 2012, I will be tasked to install 10k clients to Ava grids. Will this util work as well.

    • Lane

      Hi Wayne,

      Do you have a deployment tool already for your 10K clients? Like SCCM or LANdesk? If so those would probably be way more suited towards a large scale deployment than this method. The thing about this deployment method is there isn’t a real good “reporting” mechanism to tell if the client succeeded besides looking in Avamar. Without knowing the exact details of your rollout and timeframe of client deployment I cannot say 100% this will or will not work.

      All this “utility” is doing is scripting the install of the MSI file and registering the client on the Avamar grid. In Avamar 6 you can deploy the client this way (using a script) and then use the activation manager to actually register the clients. You should work with your EMC team to solidify a proper deployment model before proceeding, 10K clients is a HUGE deployment. :-)

      If you have other questions go ahead and send me an email via the ContactMe button, I’ll do my best to help out.

      Thanks!
      ~Lane

      • Wayne

        NO SCCM or LANdesk. That is why I’m searching for a util. 10K is big, this is only the test bed. if it goes well it will go bigger. It will phased appoach 2-5 hundred a week.

  6. Wayne

    Where is the hostname read into the powershell if using batch files?

    • Lane

      Hi Wayne,

      The batch files are nothing more than the pre-built commands to run the PowerShell script with the correct arguments. If you look at the sample excel document you can see the column “Server Hostname”. This is where you would put your hostname, you then enter the Avamar Domain location where you want the server to be registered “Server Location” (which correlates to lines 15,16,17 in the AvamarClientInstall.ps1), after that you put in the type of server under the “Server Type” column (this correlates to lines 28-80). When you do this it creates the “Batch File Command” for each server. That’s why I was saying 10K is a lot of clients, because you can’t necessarily run this for 10K clients in a single night/day. But if you are spreading out the deployment to 2-500 a week, you could use this script for that. Remember, the batch file suggestion is just so you can break up hundreds of commands and run them at the same time, you could just as easily copy and past 10 “Batch File Commands” into a powershell window.

      I hope this helps!

      Thanks!
      ~Lane

  7. Wayne

    Thanks Lane, We Will begin on the week of the 23rd, Doing 50 at 2 different sites for 30 day. (PROOF so to speak)… My drop died date is 12/31/12 to get all completed. So from what you have told me and from studying your outline I believe this will be a good fit. I believe the biggest issue will be ensuring that AD/LDAP is able to connect to the clients.

  8. shashi

    Hello Lane,

    I am using “AvamarClient-windows-x86_64-6.0.100-592.msi” for client installation. I have to deploy it using SCCM on large number of user desktops.

    My question is how to activate client: Below are manual steps I need to perform..

    Right Click¨ the Avamar icon in the lower right hand corner of Windows
    and select “Manage -> Activate”

    For the Administrator Server Address enter “EP1AVMR001”, and in the
    Client Domain enter “PC_POC”. Select “Activate” and you should get a
    message that your system has been successfully activated.

    Is there any script or commandline to do this automatically?

    • Lane

      Hi Shashi,

      There are two ways you can activate the clients once you have the client installed. The first way is to use the Avamar Client Manager in the Enterprise Manager web based access. You can get to this portal by going to http://avamarutilitynode/em. You will then login using your Avamar credentials. From here you click on the Client Manager and can then Activate clients from there. You can use the down arrow to tie this to a directory.

      The other way is to use the C:\Program Files\avs\bin\avregister.bat with the following syntax: avregister.bat avamarutilityservername /domain

      Thanks!

      ~Lane

Trackbacks/Pingbacks

  1. Automate EMC Avamar Client Install @ IT is what IT is « Mweaverbackupsinfo's Blog

Leave a Reply to Wayne