if ($sshclient.IsConnected)
{
Write-Output "Success"
}
else
{
Write-Output "Failed to connect to the Host '$HostName' to validate the password for the account '$UserName'. Please check the Host is online, and accessible on the network."
}