home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / lsmt213c.zip / alsc.cmd < prev    next >
OS/2 REXX Batch file  |  2000-03-08  |  2KB  |  55 lines

  1. /*---------------------------------------------------------------------------*\
  2. |                                             (C) Alain Rykaert - MAR00-MAR00 |
  3. \*---------------------------------------------------------------------------*/
  4.     Version = '1.01'
  5.     Say '* ALSC Version:' Version
  6.  
  7.  /*=======================*/
  8.     LogFile = 'alsc.log'
  9.  /*=======================*/
  10.  
  11.     Parse Upper Arg DCName
  12.  
  13.     If DCName = ''
  14.       Then Do
  15.              Say '*'
  16.              Say '* All Lan Servers Check'
  17.              Say '*'
  18.              Say '* Usage: ASLC {ServerName}'
  19.              Say '*'
  20.              Say '* Sample: ALSC \\DC01'
  21.              Say '*'
  22.              Exit
  23.            End
  24.       Else Nop
  25.  
  26.     If RxFuncQuery('LoadLSRXUTFuncs')
  27.       Then Do
  28.              Call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
  29.              Call LoadLsRxutFuncs
  30.            End
  31.       Else Nop
  32.  
  33.     If RxFuncQuery('RxLoadFuncs')
  34.       Then Do
  35.              Call RxFuncAdd 'RxLoadFuncs', 'RXUTILS', 'RxLoadFuncs'
  36.              Call RxLoadFuncs
  37.            End
  38.       Else Nop
  39.  
  40.     Say '* Getting all servers member of the Domain'
  41.     If NetGetInfo(340, 'ServerName', '\\'DCName, 'Servers') = 0
  42.       Then Do
  43.             'if exist' LogFile 'del' LogFile
  44.              Call RxStemSort 'ServerName'
  45.              Do i = 1 to ServerName.0
  46.                Counter = '('Right(i,Length(ServerName.0))'/'Right(ServerName.0,Length(ServerName.0))')'
  47.                Say '>' Counter ServerName.i
  48.               '@call lsc' ServerName.i '| tee' LogFile
  49.              End
  50.            End
  51.       Else Say RC
  52.  
  53.     Exit
  54.  
  55.