Installation on PowerShell

Installing the Keeper Commander PowerShell Module

Overview

Keeper Commander is available on the PowerShell Gallery as the PowerCommander module. This document provides instructions for installing and using this PowerShell Module

PowerShell CLI

Keeper's PowerShell command-line tool (PowerCommander) provides basic vault access and administrative functions.

PowerShell module for Keeper Commander is available on the PowerShell Gallery:

To install PowerCommander from PowerShell Gallery:

Install-Module -Name PowerCommander

GitHub Repository

To run the PowerCommander module from the source, refer to the following GitHub Link:

https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/PowerCommander

Installation Troubleshooting

Set Execution Policy Permissions

If you are unable to run PowerCommander commands, you may need to set the Execution Policy. To check this, run the following command:

PS> Get-ExecutionPolicy -List

Your output would be similar to this:

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine       Undefined

If the Scope for your installation is Undefined or Restricted, set it to Unrestricted with the following command:

PS> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

Note: The above command set the CurrentUser scope

PowerCommander Commands

Cmdlet name

Alias

Description

Connect-Keeper

kc

Login to Keeper server

Sync-Keeper

ks

Sync with Keeper server

Disconnect-Keeper

Logout and clear the data

Get-KeeperLocation

kpwd

Print current Keeper folder

Set-KeeperLocation

kcd

Change Keeper folder

Get-KeeperChildItems

kdir

Display subfolder and record names in the current Keeper folder

Get-KeeperRecords

kr

Enumerate all records

Get-KeeperSharedFolders

ksf

Enumerate all shared folders

Add-KeeperRecord

kadd

Add/Modify Keeper record

Remove-KeeperRecord

kdel

Delete Keeper record

Add-KeeperFolder

kmkdir

Create Keeper Folder

Remove-KeeperFolder

krmdir

Remove Keeper Folder

Move-RecordToFolder

kmv

Move owned record to Keeper folder

Copy-KeeperToClipboard

kcc

Copy record password to clipboard

Show-TwoFactorCode

2fa

Display Two Factor Code

Examples

Connect To Keeper Account

PS > Connect-Keeper
     Keeper Username: email_address@company.com
        ... Password:

List the content of a Keeper folder

PS > kdir

    Vault Folder: \


Mode    UID                      Name
----    ---                      ----
f-----  b3TMAYfOWJqNxeLjlA6v_g   dasdasd
f----S  BvHeHGkdRJfhGaRcI-J5Ww   shared
-r-AO-  5qx_urh2EsrL0wBdi34nFw   Web
-r---S  ktY3jEBqwFDi9UYZSxmIpw   Control
  • f - folder

  • r - record

  • S - shared

  • A - file attachments

  • O - owner

Show Two Factor Code for all records in the current Keeper folder

PS > kdir -ObjectType Record | Show-TwoFactorCode

Show Two Factor Code for all records in the Vault.

PS > kr|2fa

where

  • kr is alias for Get-KeeperRecords

  • 2fa is alias for Show-TwoFactorCode

Copy record password to clipboard

PS > 'contro' | kcc

where

  • contro is a substring of the record title. See last entry of kdir output above

  • kcc is alias for Copy-KeeperToClipboard

or

PS > 'ktY3jEBqwFDi9UYZSxmIpw' | kcc

'ktY3jEBqwFDi9UYZSxmIpw' is the Record UID of the same record

Add/Modify Keeper record

PS > kadd -Login email@company.com -GeneratePassword -URL https://company.com -Custom 'Name:John Doe' 'Record for John Doe'

Create a Keeper record

PS > kadd -GeneratePassword -UpdateOnly 'Record for John Doe'

Copy owned record to folder

PS > Get-KeeperChildItem -ObjectType Record | Move-RecordToFolder 'Shared Folder'

The above command copies all records in the current Keeper folder to the folder with name 'Shared Folder'

Last updated