cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find out what Agent Version is installed?

ITDude13
Level 3
I have Backup Exec 11D installed on a media server and it is backing up approximately 90 servers.  I need to find out what agent version number is insatlled on all the remote servers.  Is there a report or quick and easy way to do this?
 
Thanks,
Ryan
16 REPLIES 16

Hywel_Mallett
Level 6
Certified
Not that I'm aware of :(
You can go to a backup selection list, right click the server, and select properties to see the remote agent version number, or using explorer look for the version number of \\servername\c$\Program Files\Symantec\Backup Exec\RAWS\beremote.exe - that second option may be scriptable in some way.
Neither way is easy if you have 90 servers to manage though.

ITDude13
Level 3
Hywel,
 
Thank you for your response.  I will probabl;y look at the second option and have it scripted in some way.
 

Allen_K
Level 6
The following information has been forwarded to me for inclusion in this thread:

You can find the location where "Backup Exec RemoteAgent for Windows Systems" service is installed by querying the value of"ImagePath" registry key  under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BackupExecAgentAccelerator"on the remote machine. Once you have the full path, you can get the moduleversion information of the application using VerQueryValue() API.


Greg_Beck
Level 3
I have a script that should meet your requirements

backupExecReport.vbs

Code:
const HKEY_LOCAL_MACHINE = &H80000002const ADS_SCOPE_SUBTREE = 2set objFSO = CreateObject("Scripting.FileSystemObject")set objReport = objFSO.CreateTextFile("backupExecReport.xml")Write "<—xml-stylesheet type=""text/xsl"" href=""backupExecReport.xsl""–>"Write "<backupExec>"
'
' Edit here
'
ScanAD("LDAP://OU=Servers,DC=Domain,DC=com")'Report "computername"Write "</backupExec>"sub ScanAD(strOU) set objConnection = CreateObject("ADODB.Connection") set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" set objCommand.ActiveConnection = objConnection objCommand.CommandText = _ "Select Name, Location from '" & strOU & "' " _ & "Where objectClass='computer'" objCommand.Properties("Page Size") = 1000 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF wscript.echo "Checking " & objRecordSet.Fields("Name").Value Report(objRecordSet.Fields("Name").Value) objRecordSet.MoveNext Loopend subsub Report(strComputer) on error resume next set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") ' Backup Exec 11 Agent strKeyPath = "SOFTWARE\Symantec\Backup Exec For Windows\Remote Agent for Windows Servers\Install" strValueName = "Path" objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strPath if Err.Number <> 0 then strPath = "" Err.Clear end if strValueName = "Version" objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strVersion if Err.Number <> 0 then strVersion = "" Err.Clear end if ' Backup Exec 11 Open File Option strKeyPath = "SOFTWARE\Symantec\Backup Exec For Windows\Open File Option\Install" strValueName = "Version" objReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strOpenFileVersion if Err.Number <> 0 then strOpenFileVersion = "" Err.Clear end if ' clear resume next on error goto 0 if objFSO.FolderExists(ConvertToNetwork(strComputer,strPath)) then strMode = "registry" strNetworkPath = ConvertToNetwork(strComputer,strPath) bCheck = true elseif objFSO.FolderExists(ConvertToNetwork(strComputer,"c:\Program Files\Symantec\Backup Exec\RAWS\")) then strMode = "file" strNetworkPath = ConvertToNetwork(strComputer,"c:\Program Files\Symantec\Backup Exec\RAWS\") bCheck = true end if if bCheck then Write "<server mode=""" & strMode & """>" Write " <name>" & strComputer & "</name>" Write " <version>" & strVersion & "</version>" Write " <path>" & strPath & "</path>" Write " <openFileOption>" if strOpenFileVersion <> "" then Write " <installed>true</installed>" else Write " <installed>false</installed>" end if Write " <version>" & strOpenFileVersion & "</version>" Write " </openFileOption>" Write " <files>" set objFolder = objFSO.GetFolder(strNetworkPath) for each objFile in objFolder.Files Write " <file version=""" & objFSO.GetFileVersion(objFile.Path) & """>" & objFile.Name & "</file>" next Write " </files>" Write "</server>" end ifend subsub Write(strValue) 'wscript.echo strValue objReport.writeline strValueend subfunction ConvertToNetwork(strComputer, strPath) if strPath <> "" then ConvertToNetwork = "\\" & strComputer & "\" & left(strPath, 1) & "$" & right(strPath, len(strPath) - 2) else ConvertToNetwork = "" end ifend function

 
backupExecReport.xsl

Code:
<—xml version="1.0"–><xsl:stylesheet version="1.0"                xmlns="http://www.w3.org/1999/xhtml"                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  <xsl:output method="xml"              encoding="iso-8859-1"              doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"              doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"              indent="yes" />  <xsl:template match="backupExec">    <html xml:lang="en">      <head>        <title>BackupExec Agents</title>      </head>      <body>        <div id="container">          Agents Found: <xsl:value-of select="count(server)"/><br />          <xsl:apply-templates select="server">            <xsl:sort select="name" data-type ="text" />          </xsl:apply-templates>        </div>      </body>    </html>  </xsl:template>  <xsl:template match="server">    <xsl:value-of select="name"/>    <ul>      <li>        version: <xsl:value-of select="version" />      </li>      <li>        open file option: <xsl:value-of select="openFileOption/installed" />      </li>    </ul>    <br />  </xsl:template>  <!--    General Functions  -->  <xsl:template name="alternated-row">    <xsl:attribute name="class">      <xsl:if test="position() mod 2 = 1">row-0</xsl:if>      <xsl:if test="position() mod 2 = 0">row-1</xsl:if>    </xsl:attribute>  </xsl:template></xsl:stylesheet>

 
If you are using Active Directory you can just change the string after ScanAD to whatever OU you want to look at. If you just want to scan one computer comment out the ScanAD and uncomment the Report line. 

If you save the xsl file in the same directory you can just open the xml file with Internet Explorer and it will show you a list of servers and the agent version. 

This of course is a "It works for me" type thing and I take no responsibility if it causes trouble but I would be willing to help if you have trouble with it.

edit: To run the script open the command prompt and type "cscript backupExecReport.vbs"


Message Edited by gbeck on 01-31-2008 12:49 PM

ITDude13
Level 3
Thank you!  I really appreciate the help.  I will let you know if this worked.

ITDude13
Level 3
Gbeck.
 
well I modified the script as we do have an AD infrastucture here, but I can get the report to generate.
 
This is the error mesage I receive:
The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


An invalid character was found in text content. Error processing resource 'file:///Z:/BEAgent/backupExecReport.xml'. Line ...

<

If you can help, it would be great, I know pratically nothing on scripting.  Thanks.

Greg_Beck
Level 3
The xsl is really just a convience thing.  Open the xml file in notepad and you will see all of the information the script found.   You should see something like
Code:
<server mode="registry">
<name>ServerName</name>
<version>****</version>
<path>C:\Program Files\Symantec\Backup Exec\RAWS\</path>
<openFileOption>
<installed>false</installed>
<version></version>
</openFileOption>
<files>
...
<file version="...">...</file>
...
</files>
</server>

The information you are looking for is right there at the top.

If you can send me the couple of lines around before and after the one it mentions in the error I can get that problem corrected.

ITDude13
Level 3
<—xml-stylesheet type="text/xsl" href="backupExecReport.xsl"–>
<backupExec>
</backupExec>
 
 
This is the only lines that appear in the XML document the the script creates.
 
Here is the script for the XSL:
 
—xml version=1.0–
xslstylesheet version=1.0
                xmlns=httpwww.w3.org1999xhtml
                xmlnsxsl=httpwww.w3.org1999XSLTransform
  xsloutput method=xml
              encoding=iso-8859-1
              doctype-system=httpwww.w3.orgTRxhtml1DTDxhtml1-strict.dtd
              doctype-public=-W3CDTD XHTML 1.0 StrictEN
              indent=yes
  xsltemplate match=backupExec
    html xmllang=en
      head
        titleBackupExec Agentstitle
      head
      body
        div id=container
          Agents Found xslvalue-of select=count(server)br
          xslapply-templates select=server
            xslsort select=name data-type =text
          xslapply-templates
        div
      body
    html
  xsltemplate
  xsltemplate match=server
    xslvalue-of select=name
    ul
      li
        version xslvalue-of select=version
      li
      li
        open file option xslvalue-of select=openFileOptioninstalled
      li
    ul
    br
  xsltemplate
  !--
    General Functions
  --
  xsltemplate name=alternated-row
    xslattribute name=class
      xslif test=position() mod 2 = 1row-0xslif
      xslif test=position() mod 2 = 0row-1xslif
    xslattribute
  xsltemplate
xslstylesheet
 
If you need further information, let me know.

Greg_Beck
Level 3
It looks like the script didn't find anything.  When you ran the script from the command line it should have output messages like "Checking servername"

My guess is an error on the ScanAD line but to test that comment out the ScanAD line by adding a single quote ( ' ) at the start of the line. Then uncomment the Report and change the servername to a real computer. 

On the command line run cscript backupExecReport.vbs then check backupExecReport.xml to see if it contains some data about the server.  If it does have data then the ScanAD has a problem we will need to look  it.  If not we will have to try something else.

ITDude13
Level 3
gbeck,
 
I think I esolved the issue.  I just removed " ' ' Edit Here ' " before ScanAD  and ran it.  It is running, and giving me prompts "Checking Servername"
 
I'll let you know what the outcome is.
 
Thanks,
Ryan

ITDude13
Level 3
gbeck,
 
Is there a way to modify the script that if the Agent does not exist on a paticular server that it skips it?  It seems that it's hanging on a paticular server (no agent is installed).
 
Or do I have to wait an extensive period of time?
 
Thanks again for all the help!

Greg_Beck
Level 3
It should eventually timeout and continue on.

ITDude13
Level 3
Yes,
 
i now noticed that.  It takes quite some time to timeout.  Almost 5 minutes.
 
Thanks again :)

ITDude13
Level 3
gbeck,
 
I know I am a pain...but this scripts has locked up on one of the servers...been sitting here for 40 minutes.  The server it's checking is a media server in another province.  Would that be a problem?
 
If I cancel it now, can I still get the report printed for the servers it found?  It did a really good chunk of them.

Greg_Beck
Level 3
I am sorry it locked up on you.  If you hit control-c it will stop the script but you will probably have to clean up the xml file a little bit.  Depending on where it crashed you will have to add some ending tags at the end of the file ( </files></server></backupExec> )

If you post the last few lines of the xml file I might be able to tell where it locked up and get it fixed.


Message Edited by gbeck on 02-01-2008 11:23 AM

Message Edited by gbeck on 02-01-2008 11:24 AM

Hywel_Mallett
Level 6
Certified


To prevent those errors, you need to edit a single line in the XSL file, and a single line in the .VBS file
 
Change:

backupExecReport.vbs

Code:
Write "<-xml-stylesheet type=""text/xsl"" href=""backupExecReport.xsl""->"

 
backupExecReport.xsl

Code:
<-xml version="1.0"->

You see those red dashes in gbeck's scripts? Change them to question marks. The forum mangles them when you try and post question marks.
Once that's done it seems to work fine.