How to open an asset in Web Admin Console in context using AMS (Common Asset Viewer) ?
search cancel

How to open an asset in Web Admin Console in context using AMS (Common Asset Viewer) ?

book

Article ID: 235944

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation CA Client Automation - Asset Management

Issue/Introduction

How to open an asset in Web Admin Console in context using AMS (Common Asset Viewer) ?
 

Environment

Client Automation - 14.0 and above

Resolution

1- Create a ams.bat file with following lines.

Change values of lines in bold with correct value for WAC Server, SQL User and Password and SQL ServerName with InstanceName

 

@echo off
SET WAC_SERVER=JY-****
SET SQLUSER=ca_itrm
SET SQLPWD=NOT_changedR11
SET SQLSERVER=JY-****\TESTJY

echo echo off > %temp%\tempams.bat
echo start "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" http://%WAC_SERVER%/AMS/login.do?UUID=%%1"&"Action_Code=ACTION_DISCOVERED_ASSET"&"Display_Tabs=2"&"Display_Links=4"&"Subschema_Id=3 >> %temp%\tempams.bat
 
sqlcmd -U %SQLUSER% -P %SQLPWD% -d mdb -h-1 -Q "SET NOCOUNT ON SELECT dbo.hex(dis_hw_uuid) from mdb.dbo.ca_discovered_hardware where host_name ='%1'" -S %SQLSERVER% | FINDSTR "[0-9]" > %temp%\tempams.out
FOR /F %%C IN (%temp%\tempams.out) DO %temp%\tempams.bat %%C
 
del %temp%\tempams.bat
del %temp%\tempams.out

2- Then execute ams.bat with a computer name in parameter.

Example :

ams.bat JY-W****