This is a
SecretManagement
extension for
1Password.
It leverages the 1password-cli
to interact with 1Password.
- PowerShell
- The
1password-cli
and accessible from Path - The SecretManagement PowerShell module
You can get the SecretManagement
module from the PowerShell Gallery:
Using PowerShellGet v2:
Install-Module Microsoft.PowerShell.SecretManagement -AllowPrerelease
Using PowerShellGet v3:
Install-PSResource Microsoft.PowerShell.SecretManagement -Prerelease
You an install this module from the PowerShell Gallery:
Using PowerShellGet v2:
Install-Module SecretManagement.1Password
Using PowerShellGet v3:
Install-PSResource SecretManagement.1Password
Once you have it installed, you need to register the module as an extension:
Register-SecretVault -Name vaultname -ModuleName SecretManagement.1Password -VaultParameters @{AccountName = 'myaccountname'; EmailAddress = 'user@youremail.com'; SecretKey = 'secretkey-for-your-account'}
Note: The name you provide the Name
parameter needs to match an existing vault in 1Password.
If you want to access more than oen 1Password vault you need to register them separately with Register-SecretVault
The module also has the following vault parameter that must be provided at registration.
Your 1Password account name.
https://myaccountname.1password.com/
^^^^^^^^^^^^^
The email address you use to log into 1Password.
The SecretKey for your 1Password vault. Find your Secret Key or Setup Code