.Net and PowerShell
Additional Commander tools available in .Net and PowerShell
Keeper Commander (as described in this documentation) is written in Python and available on Github. We also have another Commander SDK which is written in .Net along with a PowerShell module that contains a subset of functionality. This page describes the .Net version of Commander.
Keeper's .Net Commander tool provides basic vault access, a developer SDK for vault access and administrative functions:
https://github.com/Keeper-Security/keeper-sdk-dotnet
For source integration into your .Net code, please utilize the KeeperSDK Library source code:
https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/release/KeeperSdk
Find detailed API documentation at the following URL:
https://keeper-security.github.io/gitbook-keeper-sdk/CSharp/html/R_Project_Documentation.htm
- .Net Framework 4.5
- .Net Core 2.1
- .Net Standard 2.0
For help with implementation of SDK features, please see the Sample Application:
https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/Sample
The .Net Commander CLI Sample App contains several basic operations such as logging in, authentication with two-factor, loading and decrypting the vault and updating passwords.
Keeper's PowerShell command-line tool (PowerCommander) provides basic vault access and administrative functions:
https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/release/PowerCommander
For more advanced command line capabilities, please refer to the Python-based Commander CLI.
To install the PowerCommander module for a specific user copy PowerCommander\ directory to
%USERPROFILE%\Documents\WindowsPowerShell\Modules
To install the PowerCommander module for all users copy PowerCommander\ directory to
C:\Program Files\WindowsPowerShell\Modules
Unblock .dll Files
If you see the following message when trying a command, you may need to unblock the .dll files

To Unblock the .dll files, navigate to the PowerCommander folder, right click on each .dll file, select properties, click 'Unblock' in the security section, and click Apply to save changes.

If you do not see the 'Unblock' checkbox, the file is already unblocked
Make this update for each of the .dll files in the PowerCommander folder:
- BouncyCastle.Crypto.dll
- Google.Protobuf.dll
- KeeperSdk.dll
- System.Buffers.dll
- System.Memory.dll
- System.Runtime.CompilerServices.Unsafe.dll
Once each .dll file has been unblocked, try the PowerShell command again.
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
You will see a list like the following:
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
This example sets the CurrentUser scope
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 |
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
PS > kdir -ObjectType Record | Show-TwoFactorCode
PS > kr|2fa
where
kr
is alias forGet-KeeperRecords
2fa
is alias forShow-TwoFactorCode
PS > 'contro' | kcc
where
contro
is a substring of the record title. See last entry ofkdir
output abovekcc
is alias forCopy-KeeperToClipboard
or
PS > 'ktY3jEBqwFDi9UYZSxmIpw' | kcc
'ktY3jEBqwFDi9UYZSxmIpw'
is the Record UID of the same recordPS > kadd -Login [email protected] -GeneratePassword -URL https://company.com -Custom 'Name:John Doe' 'Record for John Doe'
creates a record in Keeper
PS > kadd -GeneratePassword -UpdateOnly 'Record for John Doe'
generates a new password
PS > Get-KeeperChildItem -ObjectType Record | Move-RecordToFolder 'Shared Folder'
copies all records in the current Keeper folder to the folder with name 'Shared Folder'
Last modified 2mo ago