{"id":359,"date":"2012-01-31T23:51:04","date_gmt":"2012-01-31T22:51:04","guid":{"rendered":"http:\/\/www.bussink.ch\/?p=359"},"modified":"2018-05-23T18:00:17","modified_gmt":"2018-05-23T16:00:17","slug":"first-steps-with-powercli","status":"publish","type":"post","link":"https:\/\/www.bussink.ch\/?p=359","title":{"rendered":"First Steps with PowerCLI"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>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.<\/p>\n<div id=\"attachment_360\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Installing-PowerCLI-01.png\"><img aria-describedby=\"caption-attachment-360\" loading=\"lazy\" class=\"size-medium wp-image-360 \" title=\"Installing PowerCLI 5.0.1\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Installing-PowerCLI-01-300x228.png\" alt=\"\" width=\"300\" height=\"228\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Installing-PowerCLI-01-300x228.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Installing-PowerCLI-01.png 514w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-360\" class=\"wp-caption-text\">Installing PowerCLI 5.0.1 Build 4431<\/p><\/div>\n<div id=\"attachment_361\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Installing-PowerCLI-02.png\"><img aria-describedby=\"caption-attachment-361\" loading=\"lazy\" class=\"size-medium wp-image-361 \" title=\"Selecting vCloud Director PowerCLI feature &amp; changing install Path\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Installing-PowerCLI-02-300x228.png\" alt=\"\" width=\"300\" height=\"228\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Installing-PowerCLI-02-300x228.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Installing-PowerCLI-02.png 514w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-361\" class=\"wp-caption-text\">Selecting vCloud Director PowerCLI feature &amp; changing install Path<\/p><\/div>\n<p>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.<\/p>\n<div id=\"attachment_364\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Modifying-PowerCLI-Layout.png\"><img aria-describedby=\"caption-attachment-364\" loading=\"lazy\" class=\"size-medium wp-image-364 \" title=\"Modifying PowerCLI Layout\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Modifying-PowerCLI-Layout-300x227.png\" alt=\"\" width=\"300\" height=\"227\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Modifying-PowerCLI-Layout-300x227.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Modifying-PowerCLI-Layout.png 678w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-364\" class=\"wp-caption-text\">Modifying PowerCLI Layout<\/p><\/div>\n<p>And now we are getting to the two basic commands you add to your PowerCLI to ensure you can run RemoteSigned code.<\/p>\n<p>[box] set-ExecutionPolicy RemoteSigned[\/box]<\/p>\n<div id=\"attachment_365\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/00-Set-ExecutionPolicy-RemoteSigned.png\"><img aria-describedby=\"caption-attachment-365\" loading=\"lazy\" class=\"size-medium wp-image-365 \" title=\"Set-ExecutionPolicy RemoteSigned\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/00-Set-ExecutionPolicy-RemoteSigned-300x77.png\" alt=\"\" width=\"300\" height=\"77\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/00-Set-ExecutionPolicy-RemoteSigned-300x77.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/00-Set-ExecutionPolicy-RemoteSigned-1024x263.png 1024w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/00-Set-ExecutionPolicy-RemoteSigned.png 1053w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-365\" class=\"wp-caption-text\">Set-ExecutionPolicy RemoteSigned<\/p><\/div>\n<p>As I&#8217;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<\/p>\n<p>[box] Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -WarningAction SilentlyContinue[\/box]<\/p>\n<div id=\"attachment_366\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/01-Set-PowerCLIConfiguration-InvalidCertificateAction-Ignore-WarningAction-SilentlyContinue.png\"><img aria-describedby=\"caption-attachment-366\" loading=\"lazy\" class=\"size-medium wp-image-366 \" title=\"Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -WarningAction SilentlyContinue\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/01-Set-PowerCLIConfiguration-InvalidCertificateAction-Ignore-WarningAction-SilentlyContinue-300x66.png\" alt=\"\" width=\"300\" height=\"66\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/01-Set-PowerCLIConfiguration-InvalidCertificateAction-Ignore-WarningAction-SilentlyContinue-300x66.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/01-Set-PowerCLIConfiguration-InvalidCertificateAction-Ignore-WarningAction-SilentlyContinue.png 977w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-366\" class=\"wp-caption-text\">Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -WarningAction SilentlyContinue<\/p><\/div>\n<p>When connecting to my vCenter I now only get a pop-uo for the User Credentials.<\/p>\n<div id=\"attachment_373\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Connect-VIServer-with-Pop-up.png\"><img aria-describedby=\"caption-attachment-373\" loading=\"lazy\" class=\"size-medium wp-image-373\" title=\"Connect-VIServer will request Credentials\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Connect-VIServer-with-Pop-up-300x151.png\" alt=\"\" width=\"300\" height=\"151\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-with-Pop-up-300x151.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-with-Pop-up.png 688w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-373\" class=\"wp-caption-text\">Connect-VIServer will request Credentials<\/p><\/div>\n<p>I can also save my credentials for future use.<\/p>\n<div id=\"attachment_372\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Connect-VIServer-with-Credentials-saving.png\"><img aria-describedby=\"caption-attachment-372\" loading=\"lazy\" class=\"size-medium wp-image-372\" title=\"Connect-VIServer with Credentials saving\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Connect-VIServer-with-Credentials-saving-300x28.png\" alt=\"\" width=\"300\" height=\"28\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-with-Credentials-saving-300x28.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-with-Credentials-saving-1024x97.png 1024w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-with-Credentials-saving.png 1061w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-372\" class=\"wp-caption-text\">Connect-VIServer with Credentials saving<\/p><\/div>\n<p>And so the next time I don&#8217;t even need to re-enter these credentials.<\/p>\n<div id=\"attachment_371\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Connect-VIServer-using-saved-Credentials.png\"><img aria-describedby=\"caption-attachment-371\" loading=\"lazy\" class=\"size-medium wp-image-371\" title=\"Connect-VIServer using saved Credentials\" src=\"http:\/\/www.bussink.ch\/wp-content\/uploads\/\/2012\/02\/Connect-VIServer-using-saved-Credentials-300x126.png\" alt=\"\" width=\"300\" height=\"126\" srcset=\"https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-using-saved-Credentials-300x126.png 300w, https:\/\/www.bussink.ch\/wp-content\/uploads\/2012\/02\/Connect-VIServer-using-saved-Credentials.png 683w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-371\" class=\"wp-caption-text\">Connect-VIServer using saved Credentials<\/p><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 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, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":366,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[32,213],"_links":{"self":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts\/359"}],"collection":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=359"}],"version-history":[{"count":14,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":1971,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/posts\/359\/revisions\/1971"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=\/wp\/v2\/media\/366"}],"wp:attachment":[{"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bussink.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}