PowerShell ISE and Bitwarden CLI are not working together

Steps to reproduce:

  1. i open the PowerShell ISE.
  2. i type in: “bw login”.
  3. the PowerShell ISE hangs. The window still responds, but the command line doesn’t output anything and you can’t type anything anymore.

I check this on three different windows-pc`s.

In VSCode and PowerShell Shell already is working.

Name Value

PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3

Hello @superfliege90,

I can reproduce this concern within PowerShell ISE which hangs for the user prompts to enter email or an api key.
This may be due to how ISE is primarily designed around scripting, or possibly how ISE is running the bw.exe when it expects a user prompt during bw login

Possibly check out the --nointeraction option, or you could possibly pass the --session key as an environment variable.

PowerShell ISE also appears to work with bw login using an API key which typically also requires user interaction and a prompt for the API keys client_id and client_secret
However these can also be passed as environment variables in which case bw login --apikey will work as expected in ISE.