Hi,
The last years we run our PowerCLI Scripts on a Windows Servcer 2016 with Powershell 5. Now we changed to Server 2022, Powershell 7.4.5 und PowerCLI 13.3.
Since that change no of the Scripts works. It seems there is a problem with credentials.
I saved the login credentials with Get-Credentials and Export-CLIxml and import them with Import-CLIxml
Trying to import the *.cred File, i got this:
Import-Clixml : Key not valid for use in specified state.
At D:\aaaaaaa\bbbbbbb\cccccccc\searchSnap_newXXXX.ps1:16 char:15
+ $credential = Import-Clixml X:\yyyyyy\zzzzzzz\xy.cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Clixml], CryptographicException
+ FullyQualifiedErrorId : System.Security.Cryptography.CryptographicException,Microsoft.PowerShell.Commands.ImportClixmlCommand
Also when trying to create a new credential file, the file ist emtpy:
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
<S>1</S>
</Objs>
How can i fix this problems?
Thanks
Andi