Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
3 years ago1Password for VSCode - can you use secrets in Powershell scripts?
Hi all, trying to work out if the 1Password plugin for VSCode means it can be used in Powershell scripts or the integrated Powershell Console by any chance? I've reviewed all the doco and examples I ...
Former Member
3 years agoHey @swanny,
Thank you for reaching out to us!
I see a couple of questions here, I'll try to break it down:
First of all, related to whether the extension can be used within VS Code's integrated terminal (where your shell is Powershell), this is not currently possible.
Related to using secret references that get replaced in your script by the underlying 1Password secrets, this is not necessarily related to the VSCode extension, it is a feature of the CLI. i.e. you can achieve this using configuration files (via op inject
) or environment variables (via op run
). I'll link some relevant documentation here:
https://developer.1password.com/docs/cli/secret-references
https://developer.1password.com/docs/cli/secrets-environment-variables
https://developer.1password.com/docs/cli/secrets-config-files
Let us know if this helps. Looking forward to hearing from you.
Best,
Horia