1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link 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 message will disappear after you have made at least 12 posts. Thank you for your cooperation.

Can I pipe commands to dsmadmc?

Discussion in 'Scripting' started by droach, Dec 6, 2012.

  1. droach

    droach New Member

    Joined:
    Jan 7, 2008
    Messages:
    167
    Likes Received:
    3
    Occupation:
    I'm thinking...
    Location:
    Cut and Shoot, Texas
    I need to delete a few thousand objects from the TSM database with the command "delete object 0 nnnnnnnn". Is there a way that I can open dsmadmc once and pipe the list of commands to it?

    My current script (below) works, but requires a login every time and clutters up the log file

    dsmadmc %LOGINPARAMS% %tsmhost% "delete object 0 nnnnnnn1"
    dsmadmc %LOGINPARAMS% %tsmhost% "delete object 0 nnnnnnn2"
    dsmadmc %LOGINPARAMS% %tsmhost% "delete object 0 nnnnnnn3"
    .
    .
    .

    I am running bat files on a Windows TSM installation.
     
  2.  
  3. moon-buddy

    moon-buddy Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,079
    Likes Received:
    269
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    If the TSM header is your problem, do this:

    dsmdmc /tcpserveraddress=<TSM_Server> /tcpport=<TSM_Port> /id=<admin> /pa=<password> /noc /dataonly=yes "Delete ...."
     
    droach likes this.
  4. droach

    droach New Member

    Joined:
    Jan 7, 2008
    Messages:
    167
    Likes Received:
    3
    Occupation:
    I'm thinking...
    Location:
    Cut and Shoot, Texas
    Thanks for the reply Moon-buddy. That did help reduce the fluff in my logs.
     

Share This Page