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
2 years agoop item edit removes " Character from Password
Hi,
i try to update an item password with 1Password Cli which has a " Character in it. This character is removed from password when the password is written to the vault. I've tried already some va...
Former Member
2 years agoHi,
I've found a solution for the mentioned problem. What is strange is, that the behavior is different if you call op item edit in PowerShell 5, Powershell 7 or for example zsh on MacOS.
In Powershell 5 it is required to Mask the " character with a \. I've came op with the following code that will handle that situation. Maybe it is useful for someone!
$Password = 'T"e""s"t'
If ($PSVersionTable.PSVersion.Major -le '5') {
$Password = $Password.Replace('"','\"')
}
$Command = 'op item edit "{0}" ''password={1}''' -f $("TestItem", $Password)
Invoke-Expression -Command $Command
Kind regards
Stefan