It seems that the Connect-Swiss can accept PS credentials I do this:
$global:username = Read-Host "Username"
$global:password = Read-Host -AsSecureString "Password"
$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?
What does your call to Connect-Swis look like? And what error are you getting?