{"id":1113,"date":"2012-12-24T09:14:37","date_gmt":"2012-12-24T14:14:37","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=1113"},"modified":"2012-12-24T09:14:37","modified_gmt":"2012-12-24T14:14:37","slug":"vcenter-plugins-ssl-certificates-extensionmanager-and-powershell-what-more-could-you-want-for-christmas","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/vcenter-plugins-ssl-certificates-extensionmanager-and-powershell-what-more-could-you-want-for-christmas\/","title":{"rendered":"vCenter Plugins, SSL certificates, ExtensionManager and Powershell &#8211; what more could you want for Christmas?"},"content":{"rendered":"<p>I was recently working in a lab environment trying to register the vCenter Operations 5.6 virtual appliance into a vCenter Virtual Appliance environment.  As a standard practice I like to issue CA signed certificates to everything &#8212; even in a lab environment &#8212; so I&#8217;ll know what to expect in production.  <\/p>\n<p>Even after replacing the SSL certificate (here are some instructions on that process: <a href=\"http:\/\/www.bussink.ch\/?p=458\">http:\/\/www.bussink.ch\/?p=458<\/a>) you&#8217;ll still get an SSL warning because the plugin is registered by IP address instead of DNS name.  There is another great article here: <a href=\"http:\/\/www.vstable.com\/2012\/04\/02\/vcenter-operations-5-x-vcenter-plugin-uses-ip-instead-of-dns-hostname\/\">http:\/\/www.vstable.com\/2012\/04\/02\/vcenter-operations-5-x-vcenter-plugin-uses-ip-instead-of-dns-hostname\/<\/a> that includes a two step process to resolve the warnings.<\/p>\n<p>Step 1 is easy and very straight forward&#8230;you use vi or some other text editor to update a file on the UI virtual appliance.  The second step is a little more challenging because I&#8217;m working with the vCenter Virtual Appliance and the embedded database, making the required database changes a bit tougher.  Since the article described where to find this value in the Managed Object Browser, I figured I could find and update it from PowerCLI.<\/p>\n<pre><code class=\"language-1\">\r\n$exMgr = Get-View ExtensionManager\r\n$vcops = $exMgr.ExtensionList | ?{$_.key -eq 'com.vmware.vcops'}\r\n$vcops.Server[0].Url = \"https:\/\/vcops-ui\/vcops-vsphere\/viClientConfig.xml\"\r\n$exMgr.UpdateExtension($vcops)\r\n<\/code><\/pre>\n<p>This code is fairly straightforward.<br \/>\nLine 1: Use Get-View to connect to the ExtensionManager where vSphere plugins are registered.<br \/>\nLine 2: Find the vCOps plugin and make a copy of all the properties to a variable called $vcops.<br \/>\nLine 3: Update only the Server URL to use a name instead of an IP address<br \/>\nLine 4: Use the ExtensionManager connection from line 1 to write the updated $vcops extension back to vCenter<\/p>\n<p>A refresh of the MOB shows that this updated value is immediately available &#8212; even without a restart of the vCenter Service.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was recently working in a lab environment trying to register the vCenter Operations 5.6 virtual appliance into a vCenter Virtual Appliance environment. As a standard practice I like to issue CA signed certificates to everything &#8212; even in a &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/vcenter-plugins-ssl-certificates-extensionmanager-and-powershell-what-more-could-you-want-for-christmas\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-1113","post","type-post","status-publish","format-standard","hentry","category-scripting","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=1113"}],"version-history":[{"count":4,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1113\/revisions"}],"predecessor-version":[{"id":1117,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1113\/revisions\/1117"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=1113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=1113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=1113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}