It is often useful to extract a list of the hostnames of servers that are running ITM Agents for processing by command files or scripts or the for command. Although the hostname of a server is embedded in the ITM agent name, the ITM commands will always return the full agent name, and not just the hotsname.

On Windows, it is possible to use the built-in for command to extract the hostname for all agents, as follows:

First log-in to the tacmd environment:

tacmd login -s <tems_hostname> -u <user_name>

Secondly, use the ITM command tacmd listsystems to list the desired agents, and parse with the Windows command for to extract the hostnames:

@for /F "delims=: tokens=2" %i in ('tacmd listsystems -t NT') do @echo %i

The -t option for tacmd identifies the ITM agent product code, in the above example NT is used for the Windows OS Agent.

To use this syntax within a command file, add an additional % to the vairiable %i, for example:

@for /F "delims=: tokens=2" %%i in ('tacmd listsystems -t NT') do @echo %%i

Twitter Feed

OrbData Is your company ready for #GDPR? https://t.co/fGybdNrlCh
4hreplyretweetfavorite
OrbData Setting up Windows PowerShell discoveries with #IBM #TADDM https://t.co/pxMZ2eVPpo

Address

Address:
100 Longwater Avenue, Green Park, Reading, RG2 6GP, U.K.
Tel:
+44 (0) 118 945 0130
E-Mail:
This email address is being protected from spambots. You need JavaScript enabled to view it.

markerFind on Google Maps

About Us

Orb Data brings together People, Process and Technology to deliver the cornerstone of business success: the management of IT infrastructure. At our heart are our people. We have unrivalled experience, helping us to achieve an enviable reputation for excellence in project delivery. Because we’re independent, we identify actual issues and help organisations resolve them –from spec to deployment, and beyond –providing the right solution in terms of best of breed technology and support. We offer a refreshingly simple approach to the way we conduct business. We take pride in our abilities to provide first class solutions to business problems, and to conduct working relationships with honesty and integrity.

Follow Us On:

JoomShaper