1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Need to create bat script to register clients on multiple servers

Discussion in 'Scripting' started by beezer1979, Dec 8, 2016.

  1. beezer1979

    beezer1979 Newcomer

    Joined:
    Jun 13, 2016
    Messages:
    4
    Likes Received:
    0
    I need to create a windows bat script that will register node on a server. The idea is that the script will get the server name by %COMPUTERNAME% . Depending on the server name it would then be registered on 1 out of 4 servers (Prod, dev, test, & test 2). Any suggestions out there? :)
     
  2.  
  3. Efim

    Efim ADSM.ORG Senior Member

    Joined:
    Jun 26, 2006
    Messages:
    557
    Likes Received:
    22
    Hi,
    you can use TSM routing commands. It allows you to route commands to one or more TSM servers.
    Before use it you have to setup server-to-server communication.
    Ex:
    tsmserver1: register node ...
    tsmserver2: register node ...
    tsmserver1,tsmserver2: register node or (tsmserver1,tsmserver2) register node ...
    e.t.s
    Efim
     
  4. chavdar.cholev

    chavdar.cholev ADSM.ORG Member

    Joined:
    Apr 17, 2007
    Messages:
    15
    Likes Received:
    0
    Hi,
    if it is AIX, you can do:
    1. Create tsm_nodes.txt file and put there tsm nodes and domain, separated by tab, as follow:
    node1 domain1
    node2 domain1
    node3 domain2
    .
    .
    .
    nodeN domainN

    2. Creates .ksh script as:
    #!/bin/ksh

    #Script create TSM nodes per server TSM
    while read line
    do

    NODE=`echo $line | awk '{print $1}'`
    DOM=`echo $line | awk '{print $2}'`

    dsmadmc -id=<TSM_admin>-pass=<****>-noconfirm << EOT
    register node $NODE tivoli domain=$DOM
    EOT

    done < tsm_node.txt


    And run on every tsm server...

    HTH
    Chavdar
     
  5. moon-buddy

    moon-buddy ADSM.ORG Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,732
    Likes Received:
    350
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    The suggestions above are all good but I think the requirement was not answered correctly.

    The requirement is for a node to be registered on 1 of 4 TSM servers depending on the type of server (node) it is. The type is determined by the server (node) name. In this scenario, either open or close registration will work depending on what account is used to register the node. More so, if registration is coming from the node, a full BA client installation is required - meaning dsmadmc.exe must be installed.

    beezer1979:

    What is the server name pattern? How to tell if PROD, DEV, TEST and TEST2? This has to be known before a script can be developed.
     

Share This Page