All pages
Powered by GitBook
1 of 1

Loading...

Automating with Windows Task

Running Commander CLI commands using Windows Task automation

To set up a scheduled task in Windows to run a specific Keeper Commander CLI command on a scheduled basis, you can use the Task Scheduler tool.

In the below example, we'll re-generate a password in the vault on a daily basis.

1

Install

Install Keeper Commander for Windows

2

Login

Login to Commander by launching the application. For example:

3

Enable Persistent Login

After login, set up persistent login so that the command can execute from Task Scheduler.

As an example, the below commands will enable "Stay Logged In" for 30 days:

To exit the shell session, type quit but don't type logout. Logout will expire the session and the automations won't work.

4

Create a Record

From the command line, we'll create a quick record with a random password.

If you have the web vault or other Keeper vault opened, you'll see the record appear.

5

Open Task Scheduler

  • Press Win + R to open the Run dialog.

6

Create a Basic Task

  • In the Task Scheduler, click on the "Create Basic Task..." option on the right side.

7

Set the Trigger

  • Choose the "Daily" option and click Next.

8

Set the Action

  • Choose the "Start a program" option and click Next.

9

Finish the Task

  • Click Next to review the details of your task.

Summary

In this particular example, the password will rotate from the Keeper vault and you'll see this occur in realtime across all logged-in vault clients. Another example is running a security audit report, such as:

Any feature or capability of the end-user vault or Admin Console can be automated this way. Take a look at all the Keeper Commander available.

To expand upon this use case, you would likely want to set up a Batch file and execute the batch of commands instead of adding them directly on the CLI arguments. More information about batch mode commands can be found .

To confirm that persistent login is working, execute Commander again and it will automatically login to the shell

Type taskschd.msc and press Enter. This opens the Task Scheduler.

Enter a name and description for your task, such as "Daily Keeper Commander Task".
  • Click Next.

  • Set the start date and time for the task to run. Ensure the recurrence is set to "1 day" to repeat the task daily.
  • Click Next.

  • In the "Program/script" field, enter the path to your Keeper Commander executable, for example:
    • In the "Add arguments (optional)" field, enter your Keeper Commander CLI command. For example:

    Click Finish to create the task.
  • To make sure the command works, select the Task and click "Run" on the right side.

  • commands
    here
    server US
    login [email protected]
    this-device register
    this-device persistent-login on
    this-device ip-auto-approve on
    this-device timeout 30d
    quit
    record-add -t "Test Record" password=$GEN --record-type=login
    security-audit-report --output c:\path\to\file
    "C:\Program Files (x86)\Keeper Commander\keeper-commander.exe"
    record-update -r "Test Record" password=$GEN