It seems that the Connect-Swiss can accept PS credentials I do this:
$global:username = Read-Host "Username"
$global:password = Read-Host -AsSecureString "Password"
Write-Output ""
$global:creds = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$password
So I end up having $creds as a ps auth... It does not work. What am I missing?