Topic
8 replies Latest Post - ‏2013-08-07T13:23:03Z by jdefilip
jdefilip
jdefilip
24 Posts
ACCEPTED ANSWER

Pinned topic Inactive Computer Cleanup

‏2013-07-02T15:38:40Z |

Is there a way to automatically remove computers from the Endpoint Dbase that have not reported in 60+ days?

 

Thank you!

  • Tim.Rice
    Tim.Rice
    40 Posts
    ACCEPTED ANSWER

    Re: Inactive Computer Cleanup

    ‏2013-07-02T16:02:28Z  in response to jdefilip

    Look at BESComputerRemover

     

    • jdefilip
      jdefilip
      24 Posts
      ACCEPTED ANSWER

      Re: Inactive Computer Cleanup

      ‏2013-07-02T16:39:03Z  in response to Tim.Rice

      BESComputerRemover.exe -D -P -E -I -L "C:\TEMP"

       

      Will this work to delete duplicates, remove the data for deleted computers?  Also, how would I set the batch file to remove computers that havent reported within 60+ days?

       

      Thanks!

      • Tim.Rice
        Tim.Rice
        40 Posts
        ACCEPTED ANSWER

        Re: Inactive Computer Cleanup

        ‏2013-07-02T16:55:38Z  in response to jdefilip

        Taken directly from the page I linked to in the previous posting ...

        This tool will perform database operations for the following sets of data:

        • Duplicate Computers - Marks older computers as deleted if a computer exists with the same computer name.
        • NotReported Computers - Marks computers as deleted if there are no property results being reported and schedules a full refresh for the computer.
        • Expired Computers - Marks computers as deleted if they have not reported in recently.
        • Deleted Computers - Physically removes computer data from the database for computers that are already marked as deleted and have not reported in for a long period of time.

        I use a batch file with the following line ... BESComputerRemover-3.0.1.126.exe -f -l -L . -D -c -T 180 -t 90

        • It runs silently (-f)
        • Standard output goes to a log file (-l)
        • I specify the folder to create the logs in (-L)
        • It removes duplicate computers based on Computer Name. (-D)
        • It removes Computers that have not reported in 90 days. (-t)
        • It purges Computer data for computers that have not reported for 180 days. (-T)
        • I don't want the tool to waste time counting the rows it will delete. (-c)

        All of the optional arguments are spelled out on the page.

        • -h : Displays this help message
        • -? : Displays this help message
        • -help : Displays help message for installing this tool as a service.
        • -f : Runs in silent mode. No standard output and script runs automatically to completion.
        • -l : Sends standard out to logfile created in the directory of this application with name BESComputerRemover.log
        • -L <Folder> : Specify a folder to create logs in. Do not include a file name.
        • -d <BES DSN> : Used to specify a DSN to connect to the BES Database with. Defaults to bes_bfenterprise if not specified
        • -u <username> : Used to specify a username for SQL authentication to the database.
        • -p <password> : Used to specify a password for SQL authentication to the database.
        • -A : Run all database cleaning operations.
        • -D : Mark Duplicate Computers as deleted. -N : Specify a text file with computer names to be deleted. -P <PropertyName> : Use the specified retrieved property to find duplicate computers, like "Mac Address". (Default "Computer Name")
        • -n : Mark NotReported Computer as deleted.
        • -e : Mark Expired Computers as deleted.
        • -t <days>: Specify the number of days after which an Expired Computer will be marked as deleted. (Default 30)
        • -E : Remove data from the database for Deleted Computers.
        • -T <days>: Specify the number of days after which computers marked as deleted will have their data removed. (Default 90)
        • -c : Do NOT count data before deleting.
        • -b <batch size> : Performs database deletion operations in batches of this size. The tool will pause between batches until the user presses a key (unless run in silent mode with -f).
        • jdefilip
          jdefilip
          24 Posts
          ACCEPTED ANSWER

          Re: Inactive Computer Cleanup

          ‏2013-07-03T13:25:28Z  in response to Tim.Rice

          Thanks Tim!!

          • Tim.Rice
            Tim.Rice
            40 Posts
            ACCEPTED ANSWER

            Re: Inactive Computer Cleanup

            ‏2013-07-03T18:59:19Z  in response to jdefilip

            I should note that I recently added the -A option to the command line.  It seems to have only been processing the first command.

            • jdefilip
              jdefilip
              24 Posts
              ACCEPTED ANSWER

              Re: Inactive Computer Cleanup

              ‏2013-07-04T16:37:54Z  in response to Tim.Rice

              BESComputerRemover-3.0.1.126.exe -A -f -l -L . -D -c -T 180 -t 90

        • StacyLee
          StacyLee
          26 Posts
          ACCEPTED ANSWER

          Re: Inactive Computer Cleanup

          ‏2013-07-15T16:38:26Z  in response to Tim.Rice

          We use for this 90 days and go with the MAC addresses property since it is common for us to have duplicate computer names.

           

          BESComputerRemover-3.0.1.129.exe -f -l -D -P "MAC Addresses" -n -e -t 90 -E

          • jdefilip
            jdefilip
            24 Posts
            ACCEPTED ANSWER

            Re: Inactive Computer Cleanup

            ‏2013-08-07T13:23:03Z  in response to StacyLee

            I'm currently working with BES support to resolve the issue with this script to set the SQL username and password.

            c:\BESComputerRemover\BESComputerRemover-3.0.1.129.exe -f -l -L . -D -c -T 180 -t 90

            Has anyone had their script fail requiring credentials?

             

            Thanks