Sijoejohn / HP-Aruba-switch-firmware-upgrade-auto

The Script can be used for automate firmware upgrade of HP Pro-curve and Aruba network switches which are accessible via ssh
1 stars 0 forks source link

Specified cast is not valid #1

Open Peter-Go opened 1 year ago

Peter-Go commented 1 year ago

New-SSHSession : Specified cast is not valid. At C:\scripts\switch\Switch_Firmware-upgrade-auto.ps1:106 char:13

If I manually run the command: $switch = '192.168.1.1' New-SSHSession -ComputerName $switch -Credential (Get-Credential Manager) -AcceptKey:$true

and use my credentials then I get a connection however if i use Get-Credential in the script i recieve the same error as above.

PSVersion 5.1.14393.5582 Connecting to Aruba switch

Any ideas?

Peter-Go commented 1 year ago

PSVersion 5.1.14393.5582 Connecting to Aruba switch

Sijoejohn commented 1 year ago

@Peter-Go, Thanks for the feedback. I will have a look and revert back.

Peter-Go commented 1 year ago

@Peter-Go, Thanks for the feedback. I will have a look and revert back.

If it helps, I had the scripting running in powershell ise successfully but in a separate posh window the above error occurred.