nicholasdille / PowerShell-HetznerCloud

Cmdlets for the Hetzner Cloud
Apache License 2.0
7 stars 2 forks source link

error with cmdlet "Set-HetznerCloud" #24

Open Yuri-01 opened 4 years ago

Yuri-01 commented 4 years ago

Hi and thanks for your work.

I am faced with error (see above). Screen Shot 2019-11-23 at 16 07 48


Following - about me:

OS: w2k16s (14393.2007) ru_RU

PS: Name Value PSVersion 5.1.14393.1944 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14393.1944 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

HetznerCloud: 0.9.0.45

nicholasdille commented 4 years ago

Hi, you need to supply the token as a SecureString. You can avoid to convert it manually by simply calling Set-HetznerCloud - the cmdlet will prompt you for the plaintext token and will take care of the conversion.

Does this work for you?

txtor commented 3 years ago

Hello. I get an error 401 (Unauthorized): unable to authenticate both using a SecureString and letting Set-HetznerCloud prompt for it. I am using the same token successfully with the hcloud CLI, that is the plaintext string that appears in ~/.config/hcloud/cli.toml. Is this the right string to be used as plaintext for the SecuredString?