When starting to use PowerCLI 5.0.1 for the first time, there are a few things that will help you start off a good foot. I for one, have decided when installing the PowerCLI on my system to modify the installation to add the vCloud Director PowerCLI feature and to change the path of installation, so that I can quickly find my .PS1 on my development machine.
Once installed on my development machine, I add start the PowerCLI to my taskbar and start it. I then modify the Layout settings to get a better usable window.
And now we are getting to the two basic commands you add to your PowerCLI to ensure you can run RemoteSigned code.
[box] set-ExecutionPolicy RemoteSigned[/box]
As I’m developping my code on a system other than the vCenter Server. I will get SSL Certificates warnings if I remotely connect to my vCenter. To ignore the Certificate warnings I use to following command
[box] Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -WarningAction SilentlyContinue[/box]
When connecting to my vCenter I now only get a pop-uo for the User Credentials.
I can also save my credentials for future use.
And so the next time I don’t even need to re-enter these credentials.