{"id":694,"date":"2020-03-27T15:47:51","date_gmt":"2020-03-27T15:47:51","guid":{"rendered":"http:\/\/michaelstoica.com\/?p=694"},"modified":"2020-05-06T10:12:31","modified_gmt":"2020-05-06T10:12:31","slug":"powercli-invalid-server-certificate","status":"publish","type":"post","link":"https:\/\/michaelstoica.com\/site\/powercli-invalid-server-certificate\/","title":{"rendered":"PowerCLI Invalid Server Certificate"},"content":{"rendered":"<p>I just finished installing vCenter in my homelab and I wanted to start configuring the environment using PowerCLI.<\/p>\n<p>When I tried to connect to vCenter I received the following error:\u00a0<a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.36.07.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-695\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.36.07.png\" alt=\"\" width=\"834\" height=\"143\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.36.07.png 834w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.36.07-300x51.png 300w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.36.07-768x132.png 768w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><\/a><\/p>\n<p>As you can see in the error message, Set-PowerCLIConfiguration can be used to ignore the certificate warning. To get more info about the command run\u00a0<em>Get-Help Set-PowerCLIConfiguration<\/em> and you will see in the description the link to <a href=\"https:\/\/code.vmware.com\/doc\/Set-PowerCLIConfiguration.html\">VMware Code<\/a> as well<\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.47.21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-697\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.47.21.png\" alt=\"\" width=\"833\" height=\"362\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.47.21.png 833w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.47.21-300x130.png 300w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.47.21-768x334.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/a><\/p>\n<p>So all you have to do is to run\u00a0<em>Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false\u00a0<\/em><\/p>\n<p><a href=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.42.16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-696\" src=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.42.16.png\" alt=\"\" width=\"832\" height=\"196\" srcset=\"https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.42.16.png 832w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.42.16-300x71.png 300w, https:\/\/michaelstoica.com\/site\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-27-at-17.42.16-768x181.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just finished installing vCenter in my homelab and I wanted to start configuring the environment using PowerCLI. When I tried to connect to vCenter&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/michaelstoica.com\/site\/powercli-invalid-server-certificate\/\">Continue reading<span class=\"screen-reader-text\">PowerCLI Invalid Server Certificate<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[11,10,45,52,51,8,13,12,42],"class_list":["post-694","post","type-post","status-publish","format-standard","hentry","category-general","tag-powercli","tag-powershell","tag-vcenter","tag-vcommunity","tag-vexpert","tag-virtualization","tag-vmware","tag-vsphere","tag-vsphere-6-7","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p63Lge-bc","_links":{"self":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/comments?post=694"}],"version-history":[{"count":2,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/694\/revisions"}],"predecessor-version":[{"id":718,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/694\/revisions\/718"}],"wp:attachment":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/media?parent=694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/categories?post=694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/tags?post=694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}