5 Replies Latest reply on Dec 10, 2010 1:36 PM by mariosanchez

    DumpUsersByGroup on a for loop

      I am creating a script to move my disabled users to my Disabled Users Group and want to use a for loop and doing sbadmcl -command:DumpUsersByGroup.  My problem is that I get an error message when I run it because I am reading the group names out of a file.



      for /F "usebackq" %%i in ("C:\Program Files\McAfee\ScriptLogs\Move Disabled Accounts\eemgroups.txt") do "C:\Program Files\McAfee\Endpoint Encryption Manager\sbadmcl" -command:DumpUsersByGroup -Group:"%%i" -Status:DisabledOnly -File:"C:\Program Files\McAfee\ScriptLogs\Move Disabled Accounts\movedisabledaccounts.txt" -adminuser:%adminuser% %adminauth%




      I have three users on the eemgroups.txt. I can see the loop working because it does it three times, but I get an error message:



      McAfee Endpoint Encryption Scripting Tool
      Copyright ⌐ 1991-2010 McAfee, Inc. All Rights Reserved.

      Executable version :
      DLL version        :

      >>> Connecting to "McAfee Endpoint Encryption Database"
      >>> Logging on to the database as "SBAdminba"
      >>> Logon successful
      >>> Opening dump file "C:\Program Files\McAfee\ScriptLogs\Move Disabled Accounts\movedisabledaccounts.txt"

      Connection result:

      ResultCode = 0x00000000
      ResultDescription = The operation completed successfully.

      Command result:

      Command = DumpUsersByGroup
      ResultCode = 0xdb000004
      ResultDescription = The name was not found in the database

      and then you see it done two more times after this...............


      The file gets created by is blak:  SBADMCL Dump Users By Group Report


      I also like to know if it is going to rewrite the file every time the loops runs the command, and how do I get it to append instead of re-writting the file ?



      Message was edited by: mariosanchez on 12/10/10 11:12:08 AM CST