PowerCLI without certificates

When using VMware PowerCLI to communicate with an uncertified vSphere server a number of warning messages appear upon connection.

If your circumstances don’t warrant the need for SSL certificates, for example when scripting in a test and dev. environments, there’s a couple of PowerCLI commands that can be used to stop the messages appearing.

If the script is being used by a user with administrative rights then the PowerCLI session can be configured to ignore the certificate warning using this first command.

1Set-PowerCLIConfiguration -InvalidCertificateAction Ignore

Without those administrative rights there is an alternative, the -WarningAction SilentlyContinue argument when connecting will ignore any errors. However, this should be used with caution- failing to connect to the server would normally also throw an error for example, and ignoring that could have obviously unusual results on the remainder of the script.

1Connect-VIServer myviservername -WarningAction SilentlyContinue