This is a forked version of
SecretManagement
extension for
1Password.
It leverages the 1password-cli
to interact with 1Password. It is being tweaked to work with CLI version 2. CUrrently Get-SecretInfo and Get-Secret functions work with CLI V2 but some functionality has been removed, no OTP.
- PowerShell
- The
1password-cliand 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 -AllowPrereleaseUsing PowerShellGet v3:
Install-PSResource Microsoft.PowerShell.SecretManagement -PrereleaseYou an install this module from the PowerShell Gallery:
Using PowerShellGet v2:
Install-Module SecretManagement.1PasswordUsing PowerShellGet v3:
Install-PSResource SecretManagement.1PasswordOnce 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