<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>doskiran Tracker</title>
    <link>https://communities.vmware.com/wbsdv95928/tracker</link>
    <description>doskiran Tracker</description>
    <pubDate>Sat, 11 Nov 2023 20:14:17 GMT</pubDate>
    <dc:date>2023-11-11T20:14:17Z</dc:date>
    <item>
      <title>Re: The class vim.vm.GuestInfo is not giving primary IPAddress of Virtual Machine</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/The-class-vim-vm-GuestInfo-is-not-giving-primary-IPAddress-of/m-p/2994056#M2303</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Sample program to print the Virtual machine network details(Nic name, IPv4, Mac, Nic Key, Portgroup) using VI java API(vSphere Management SDK). -&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/doskiran/vSphereJavaAPIScripts/blob/master/PrintVMNetworkDetails.java" target="_self" rel="nofollow noopener noreferrer"&gt;PrintVMNetworkDetails.java&lt;/A&gt;&lt;BR /&gt;Output:&lt;/P&gt;&lt;PRE&gt;Network Adatpter     IP4Address         Mac                  Key      Portgroup                                                                                         
----------------     ----------         ---                  ---      ---------                                                                                       
Network adapter 1    10.10.10.6         00:15:23:31:c9:22    4000     VM Network                                                                                       
Network adapter 2    10.20.20.7         07:89:61:14:38:66    4001     dvPortgroup                                                                                       &lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Ipaddesses of each vNIC:&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;GuestNicInfo[] nicArr = vm.getGuest().getNet();
for (GuestNicInfo nic : nicArr) {
	NetIpConfigInfoIpAddress[] netIpArr = nic.getIpConfig().getIpAddress();
	for (NetIpConfigInfoIpAddress netIp : netIpArr) {
		System.out.println("Ipaddress::" + netIp.getIpAddress());
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 10:38:30 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/The-class-vim-vm-GuestInfo-is-not-giving-primary-IPAddress-of/m-p/2994056#M2303</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-11-03T10:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: VIM25.jar Support Java17</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/VIM25-jar-Support-Java17/m-p/2981113#M14797</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/5498440"&gt;@VinothCM&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which version of SDK(vSphere Management SDK)&amp;nbsp;you are using?&amp;nbsp;Also, share the steps followed to reproduce this issue?&lt;BR /&gt;&lt;BR /&gt;Because&amp;nbsp;vim25.jar is generated from 1.8 java, and it should work with the LTS version of Java. (8/11/17).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;- Kiran&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 10:19:37 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/VIM25-jar-Support-Java17/m-p/2981113#M14797</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-08-07T10:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: get DRS rule conflicts in cluster using web services api</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/get-DRS-rule-conflicts-in-cluster-using-web-services-api/m-p/2980714#M14794</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;When we create Anti-Affinity and then Affinity Rule for the same VMs. The Affinity rule should become invalid(enabled = false)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;i.e. Anti-Affinity conflicting with Affinity Rule.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;API to get the status:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ClusterComputeResource -&amp;gt; ClusterConfigInfo -&amp;gt; ClusterRuleInfo -&amp;gt; &lt;STRONG&gt;isEnabled&lt;/STRONG&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;eg:&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;boolean status = ruleInfo[1].getInfo().isEnabled();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;A title="Data Object - ClusterRuleInfo(vim.cluster.RuleInfo)" href="https://vdc-download.vmware.com/vmwb-repository/dcr-public/fa5d1ee7-fad5-4ebf-b150-bdcef1d38d35/a5e46da1-9b96-4f0c-a1d0-7b8f3ebfd4f5/doc/vim.cluster.RuleInfo.html" target="_self"&gt;Data Object - ClusterRuleInfo(vim.cluster.RuleInfo)&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;enabled (boolean)&lt;/STRONG&gt; ==&amp;gt; Flag to indicate whether or not the rule is enabled. Set this property when you configure the rule. The default value is false (disabled). If there is a rule conflict, the Server can override the setting to disable a rule.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 04 Aug 2023 06:05:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/get-DRS-rule-conflicts-in-cluster-using-web-services-api/m-p/2980714#M14794</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-08-04T06:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Rest api register active directory user</title>
      <link>https://communities.vmware.com/t5/Sample-Exchange-Discussions/Rest-api-register-active-directory-user/m-p/2980708#M88</link>
      <description>&lt;P&gt;Make sure to add&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;idm_protocol&lt;/STRONG&gt; and &lt;STRONG&gt;server_endpoints &lt;/STRONG&gt;( in&amp;nbsp;active_directory_over_ldap)&lt;STRONG&gt;&lt;BR /&gt;eg:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"idm_protocol": "LDAP"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"server_endpoints": [
          "ldap://&amp;lt;server&amp;gt;:&amp;lt;port&amp;gt;"
         ]&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 04:58:42 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Sample-Exchange-Discussions/Rest-api-register-active-directory-user/m-p/2980708#M88</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-08-04T04:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Retreive VM TAGs association via VMware SOAP API</title>
      <link>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/Retreive-VM-TAGs-association-via-VMware-SOAP-API/m-p/2976494#M619</link>
      <description>&lt;P&gt;Use&amp;nbsp;&lt;SPAN&gt;VMware common infrastructure services REST APIs(&amp;nbsp;CIS APIs) for&amp;nbsp;Tags.&lt;BR /&gt;APIs to create, manage, and enumerate tags &amp;amp;&amp;nbsp;categories&amp;nbsp;also&amp;nbsp;query the attached tags and attached objects.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Ref:&amp;nbsp;&lt;A href="https://developer.vmware.com/apis/vsphere-automation/latest/cis/tagging/tag_association/" target="_self"&gt;https://developer.vmware.com/apis/vsphere-automation/latest/cis/tagging/tag_association/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 11:24:38 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/Retreive-VM-TAGs-association-via-VMware-SOAP-API/m-p/2976494#M619</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-07-10T11:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: We were getting the below error in the API calls</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/We-were-getting-the-below-error-in-the-API-calls/m-p/2976475#M2287</link>
      <description>&lt;P&gt;Hi @&amp;nbsp;appsysadmin,&lt;BR /&gt;&lt;BR /&gt;What is the API used and parameters passed? And what is the vCenter version?&lt;BR /&gt;&lt;BR /&gt;Also refer this steps -&amp;nbsp;&lt;A href="https://communities.vmware.com/t5/VMware-code-Discussions/Unable-to-retrieve-performance-metric-for-a-vm/td-p/2971254" target="_blank"&gt;https://communities.vmware.com/t5/VMware-code-Discussions/Unable-to-retrieve-performance-metric-for-a-vm/td-p/2971254&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 15:14:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/We-were-getting-the-below-error-in-the-API-calls/m-p/2976475#M2287</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-07-12T15:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve performance metric for a vm</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Unable-to-retrieve-performance-metric-for-a-vm/m-p/2975763#M2285</link>
      <description>&lt;P&gt;Looks like&amp;nbsp;&lt;SPAN&gt;Create Acq Spec is not created.&lt;BR /&gt;vStats collects data only for the configured AcqSpecs.&lt;BR /&gt;&lt;BR /&gt;Try these steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&amp;nbsp;Create AcqSpecs with POST Create AcqSpec API&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;: &lt;EM&gt;&lt;A href="https://{api_host}/api/stats/acq-specs" target="_blank" rel="noopener"&gt;https://{api_host}/api/stats/acq-specs&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;Spec:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "counters": {
        "cid_mid": {
            "cid":"power.capacity.usage.VM"
        }
    },
    "interval" :"30",
    "expiration":"10000000000",
    "resources": [       
         {
            "type":"VM",
            "id_value":"&amp;lt;vm-moid&amp;gt;",
            "predicate":"EQUAL"
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&amp;nbsp;Query Data Points Data:&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;GET&lt;/STRONG&gt;:&amp;nbsp;&lt;EM&gt;&lt;A title="https://{api_host}/api/stats/data/dp?cid=power.capacity.usage.VM&amp;amp;types=VM" href="https://{api_host}/api/stats/data/dp?cid=power.capacity.usage.VM&amp;amp;types=VM" target="_self"&gt;https://{api_host}/api/stats/data/dp?cid=power.capacity.usage.VM&amp;amp;types=VM&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 16:34:16 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Unable-to-retrieve-performance-metric-for-a-vm/m-p/2975763#M2285</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-07-04T16:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get vm object using moref_id  pyvmomi</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/How-to-get-vm-object-using-moref-id-pyvmomi/m-p/2960632#M2259</link>
      <description>&lt;P&gt;From my understanding, internally, Vim::get_view() also retrieves from the VM Inventory view list.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Eg: &lt;/STRONG&gt;Same code in&amp;nbsp;&amp;nbsp;PyVmomi to get VM object using vm_moid&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;# vm_morref&lt;/STRONG&gt;: "vm-xx" or "vim.VirtualMachine:vm-xx"&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def getVMFromMOR(si, vm_moref):
    vm_obj = None
    view_ref = si.content.viewManager.CreateContainerView(container=si.content.rootFolder,
                                                          type=[pyVmomi.vim.VirtualMachine], recursive=True)
    for managed_object_ref in view_ref.view:
        if vm_moref in str(managed_object_ref):
            vm_obj = managed_object_ref
            break
    return vm_obj&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 13:23:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/How-to-get-vm-object-using-moref-id-pyvmomi/m-p/2960632#M2259</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-03-23T13:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set type of hard disk for virtual machine</title>
      <link>https://communities.vmware.com/t5/vSphere-SDK-for-Java-Discussions/Set-type-of-hard-disk-for-virtual-machine/m-p/2960240#M755</link>
      <description>&lt;P&gt;AFAIK, not all VM operations-based vSphere REST APIs are available in current releases. We may expect it in the next major vSphere release. But in SOAP APIs (vSphere Management APIs), have the option to set the disk provisioning type of a hard disk.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;Sample code:&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;Add new harddisk with specified capacity and disk provisioning type for a VM:&lt;BR /&gt;&lt;A href="https://developer.vmware.com/samples/1820/add-new-harddisk-with-specified-capacity-and-disk-provisioning-type-for-a-vm?h=Sample#code" target="_self"&gt;https://developer.vmware.com/samples/1820/add-new-harddisk-with-specified-capacity-and-disk-provisioning-type-for-a-vm?h=Sample#code&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 16:17:05 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-SDK-for-Java-Discussions/Set-type-of-hard-disk-for-virtual-machine/m-p/2960240#M755</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-03-23T16:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Api Sessions</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Api-Sessions/m-p/2959646#M2250</link>
      <description>&lt;P&gt;Use vSphere SOAP-based (vSphere Management SDK) APIs to get the API sessions.&lt;/P&gt;&lt;P&gt;API:&amp;nbsp;&lt;A title="SessionManager" href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/723e7f8b-4f21-448b-a830-5f22fd931b01/5a8257bd-7f41-4423-9a73-03307535bd42/doc/vim.SessionManager.html#field_detail" target="_self"&gt;SessionManager&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;sessionList&lt;/STRONG&gt;&lt;SPAN class=""&gt;*&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;A href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/723e7f8b-4f21-448b-a830-5f22fd931b01/5a8257bd-7f41-4423-9a73-03307535bd42/doc/vim.UserSession.html" target="_blank" rel="noopener"&gt;UserSession[]&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;The list of currently active sessions.&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get your API sessions, compare the client machine's IP address and application name with the IpAddress and UserAgent of the &lt;A title="UserSession" href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/723e7f8b-4f21-448b-a830-5f22fd931b01/5a8257bd-7f41-4423-9a73-03307535bd42/doc/vim.UserSession.html" target="_self"&gt;UserSession&lt;/A&gt;&amp;nbsp;object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;	public void printUserSessions(String vCenterServer, String userName, String password) {
		try {
			si = new ServiceInstance(new URL("https://" + vCenterServer + "/sdk"), userName, password, false);
			SessionManager sm = si.getSessionManager();
			UserSession[] usList = sm.getSessionList();
			for (UserSession us : usList) {
				System.out.println("Client IPAddress::" + us.getIpAddress());
				System.out.println("Session Username::" + us.getUserName());
				System.out.println("Application/UserAgent::" + us.getUserAgent());
				System.out.println("--------------------------------------------------");
			}
		} catch (Exception e) {
			System.err.println("Error ServiceInstance::" + e.getLocalizedMessage());
		}
	}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 05:47:23 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Api-Sessions/m-p/2959646#M2250</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-03-17T05:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to configure ssl on system so that i can use ssl option pyvmomi or python vshpere sdk 8.0</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/how-to-configure-ssl-on-system-so-that-i-can-use-ssl-option/m-p/2955456#M2233</link>
      <description>&lt;P&gt;The same vCenter cert works for both VC/ESXi sessions.&lt;BR /&gt;One common way to download cert is -&amp;nbsp;&lt;SPAN&gt;Click on the cert in your browser (in chrome it's to the right of the address, says "Not secure") then click the certification path, and click "CA" to export it into a crt file.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 06:41:32 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/how-to-configure-ssl-on-system-so-that-i-can-use-ssl-option/m-p/2955456#M2233</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-02-20T06:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to configure ssl on system so that i can use ssl option pyvmomi or python vshpere sdk 8.0</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/how-to-configure-ssl-on-system-so-that-i-can-use-ssl-option/m-p/2955162#M2230</link>
      <description>&lt;P&gt;Steps for Linux:&lt;BR /&gt;-------------------&lt;BR /&gt;1) Download the crt file from vCenter.&lt;BR /&gt;i.e,&lt;BR /&gt;Go to &lt;A href="https://vCenter" target="_blank" rel="noopener"&gt;https://vCenter&lt;/A&gt; in your browser and press Enter.&lt;BR /&gt;At the bottom right of the page, there is an option to "&lt;STRONG&gt;Download trusted root CA certificates.&lt;/STRONG&gt;"&lt;BR /&gt;It will download the zip file, extract it, and then navigate to the "&lt;STRONG&gt;lin&lt;/STRONG&gt;" folder, where it has the certificate file (i.e., "&lt;STRONG&gt;XXXXXXXX.0&lt;/STRONG&gt;").&lt;/P&gt;&lt;P&gt;2) Copy the cert file and save it in the "&lt;STRONG&gt;/etc/ssl/certs&lt;/STRONG&gt;" folder on your client machine.&lt;/P&gt;&lt;P&gt;3) Add the vCenter IPaddress and hostname entry in the&amp;nbsp;&lt;STRONG&gt;/etc/hosts&lt;/STRONG&gt; file. ( if any DNS resolution issue)&lt;/P&gt;&lt;P&gt;4) Run the Python program, but make sure to pass the vCenter hostname (&lt;STRONG&gt;FQDN&lt;/STRONG&gt;) instead of the IP address in the code or command.&lt;BR /&gt;Eg: without any ssl context&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyVim.connect import SmartConnect
si = SmartConnect(host="&amp;lt;vCenter or ESXi hostname&amp;gt;", user="&amp;lt;username&amp;gt;", pwd='&amp;lt;password&amp;gt;', port=443)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 12:18:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/how-to-configure-ssl-on-system-so-that-i-can-use-ssl-option/m-p/2955162#M2230</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-02-17T12:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: SOAP call in xml to remove NFS mount</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK/SOAP-call-in-xml-to-remove-NFS-mount/m-p/2954650#M14761</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Pass the ManagedObjectReference(MOID) for both HostDatastoreSystem and Datastore( not the datastore name).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1ef6c336-7bef-477d-b9bb-caa1767d7e30/82521f49-9d9a-42b7-b19b-9e6cd9b30db1/vim.host.DatastoreSystem.html#removeDatastore" target="_blank" rel="noopener"&gt;https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1ef6c336-7bef-477d-b9bb-caa1767d7e30/82521f49-9d9a-42b7-b19b-9e6cd9b30db1/vim.host.DatastoreSystem.html#removeDatastore&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Eg:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;
    &amp;lt;soap:Body&amp;gt;
        &amp;lt;RemoveDatastore xmlns="urn:internalvim25"&amp;gt;
            &amp;lt;_this xsi:type="HostDatastoreSystem" type="HostDatastoreSystem"&amp;gt;datastoreSystem-200&amp;lt;/_this&amp;gt;
            &amp;lt;datastore xsi:type="Datastore"&amp;gt;datastore-20&amp;lt;/datastore&amp;gt;
        &amp;lt;/RemoveDatastore&amp;gt;
    &amp;lt;/soap:Body&amp;gt;
&amp;lt;/soap:Envelope&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 13:37:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK/SOAP-call-in-xml-to-remove-NFS-mount/m-p/2954650#M14761</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-02-15T13:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does vsphere-automation-sdk-python require vddk</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Does-vsphere-automation-sdk-python-require-vddk/m-p/2954023#M2226</link>
      <description>&lt;P&gt;vSphere Automation SDK works only with vCenter sessions.&lt;/P&gt;&lt;P&gt;Because there are no public APIs for ESXi VMODL2.&lt;/P&gt;&lt;P&gt;Hence pass vCenter credentials in the command.&lt;/P&gt;&lt;P&gt;To run with ESXi&amp;nbsp;credentials, use vSphere management SDKs .&lt;BR /&gt;i.e,&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;pyVmomi(SOAP based) allows you to manage VMware ESXi and vCenter using Python.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;pyVmomi: &lt;A href="https://github.com/vmware/pyvmomi" target="_blank"&gt;https://github.com/vmware/pyvmomi&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Feb 2023 08:40:19 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Does-vsphere-automation-sdk-python-require-vddk/m-p/2954023#M2226</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-02-13T08:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: what is the equivalent python sdk module for perl sdk module " Vim::find_entity_view()</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/what-is-the-equivalent-python-sdk-module-for-perl-sdk-module/m-p/2954022#M2225</link>
      <description>&lt;P&gt;The equivalent python sdk module for perl sdk module is &lt;STRONG&gt;pyVmomi.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Both perl and pyVmomi are SOAP based APIs.&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;pyVmomi allows you to manage VMware ESXi and vCenter using Python.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;pyVmomi: &lt;A href="https://github.com/vmware/pyvmomi" target="_self"&gt;https://github.com/vmware/pyvmomi&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 08:35:37 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/what-is-the-equivalent-python-sdk-module-for-perl-sdk-module/m-p/2954022#M2225</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-02-13T08:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while listing all vms under ESXi 7.0 using python vsphere sdk 8.0</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Getting-error-while-listing-all-vms-under-ESXi-7-0-using-python/m-p/2954021#M2224</link>
      <description>&lt;P&gt;vSphere Automation SDK works only with vCenter sessions.&lt;/P&gt;&lt;P&gt;Because there are no public APIs for ESXi VMODL2.&lt;/P&gt;&lt;P&gt;To achieve your task use &lt;STRONG&gt;pyVmomi.&lt;BR /&gt;&lt;SPAN&gt;&amp;gt; pyVmomi(SOAP based) allows you to manage VMware ESXi and vCenter using Python.&lt;BR /&gt;&lt;BR /&gt;pyVmomi: &lt;EM&gt;&lt;A href="https://github.com/vmware/pyvmomi" target="_blank"&gt;https://github.com/vmware/pyvmomi&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Note: &lt;/EM&gt;Mentioned perl SDK is also a SOAP-based(&amp;nbsp;vSphere Web Services API)&amp;nbsp;integration point&amp;nbsp;for the vSphere Management SDK.&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Sample program to list all VMs under ESXi/vCenter:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyVim.connect import SmartConnect
import ssl

s = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH)
s.verify_mode = ssl.CERT_NONE

si = SmartConnect(
    host="&amp;lt;vCenter or ESXi server&amp;gt;",
    user="root",
    pwd="&amp;lt;passw0rd&amp;gt;",
    port=443,
    sslContext=s,
)

content = si.RetrieveContent()
for child in content.rootFolder.childEntity:
    if hasattr(child, "vmFolder"):
        datacenter = child
        vmFolder = datacenter.vmFolder
        vmList = vmFolder.childEntity
        for vm in vmList:
            summary = vm.summary
            print("VM Name: ", summary.config.name)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 08:30:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Getting-error-while-listing-all-vms-under-ESXi-7-0-using-python/m-p/2954021#M2224</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-02-13T08:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Esxi Webservice Login Not Working</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Esxi-Webservice-Login-Not-Working/m-p/2951701#M2208</link>
      <description>&lt;P&gt;The issue is not passing the right SessionManager value in tag &amp;lt;urn:_this type="SessionManager"&amp;gt; .&lt;BR /&gt;&lt;BR /&gt;To retrieve the&amp;nbsp;SessionManager value, use the below &lt;STRONG&gt;POST&amp;nbsp;&lt;/STRONG&gt;SOAP API with the body and then pass the retrieved SessionManager value in the login API.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Step#1:&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;POST:&lt;/STRONG&gt; &lt;EM&gt;&lt;A target="_blank" rel="noopener"&gt;https://&amp;lt;server&amp;gt;/sdk&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;DIV&gt;&lt;STRONG&gt;Body:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim25"&amp;gt;
    &amp;lt;soapenv:Header /&amp;gt;
    &amp;lt;soapenv:Body&amp;gt;
        &amp;lt;urn:RetrieveServiceContent&amp;gt;
            &amp;lt;urn:_this type="ServiceInstance"&amp;gt;ServiceInstance&amp;lt;/urn:_this&amp;gt;
        &amp;lt;/urn:RetrieveServiceContent&amp;gt;
    &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Response:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"...&amp;gt;
    &amp;lt;soapenv:Body&amp;gt;
        &amp;lt;RetrieveServiceContentResponse xmlns="urn:vim25"&amp;gt;
            ...
                &amp;lt;about&amp;gt;
                   ....
                &amp;lt;/about&amp;gt;
                   ...
                &amp;lt;sessionManager type="SessionManager"&amp;gt;ha-sessionmgr&amp;lt;/sessionManager&amp;gt;
                   ...
            &amp;lt;/returnval&amp;gt;
        &amp;lt;/RetrieveServiceContentResponse&amp;gt;
    &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;STRONG&gt;Step#2:&lt;/STRONG&gt;&amp;nbsp; Copy the above SessionManager value i.e, "ha-sessionmgr" and update in login api.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;POST:&lt;/STRONG&gt; &lt;EM&gt;&lt;A target="_blank" rel="noopener"&gt;https://&amp;lt;server&amp;gt;/sdk&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BODY:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vim25"&amp;gt;
   &amp;lt;soapenv:Header /&amp;gt;
   &amp;lt;soapenv:Body&amp;gt;
      &amp;lt;urn:Login&amp;gt;
         &amp;lt;urn:_this type="SessionManager"&amp;gt;ha-sessionmgr&amp;lt;/urn:_this&amp;gt;
         &amp;lt;urn:userName&amp;gt;root&amp;lt;/urn:userName&amp;gt;
         &amp;lt;urn:password&amp;gt;XXXXXXXX&amp;lt;/urn:password&amp;gt;
         &amp;lt;urn:locale&amp;gt;&amp;lt;/urn:locale&amp;gt;
      &amp;lt;/urn:Login&amp;gt;
   &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;Response:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;
    &amp;lt;soapenv:Body&amp;gt;
        &amp;lt;LoginResponse xmlns="urn:vim25"&amp;gt;
            &amp;lt;returnval&amp;gt;
                &amp;lt;key&amp;gt;xxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx&amp;lt;/key&amp;gt;
                &amp;lt;userName&amp;gt;root&amp;lt;/userName&amp;gt;
                &amp;lt;fullName&amp;gt;Administrator&amp;lt;/fullName&amp;gt;
                &amp;lt;loginTime&amp;gt;2023-01-31T09:06:39.124597Z&amp;lt;/loginTime&amp;gt;
                &amp;lt;lastActiveTime&amp;gt;2023-01-31T09:06:39.124615Z&amp;lt;/lastActiveTime&amp;gt;
                &amp;lt;locale&amp;gt;en&amp;lt;/locale&amp;gt;
                &amp;lt;messageLocale&amp;gt;en&amp;lt;/messageLocale&amp;gt;
            &amp;lt;/returnval&amp;gt;
        &amp;lt;/LoginResponse&amp;gt;
    &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 10:37:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Esxi-Webservice-Login-Not-Working/m-p/2951701#M2208</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-01-31T10:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does vsphere-automation-sdk-python require vddk</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Does-vsphere-automation-sdk-python-require-vddk/m-p/2950179#M2198</link>
      <description>&lt;P&gt;Add argument "&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;--skipverification&lt;/STRONG&gt;&lt;/FONT&gt;" at the end of the command.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;--skipverification&lt;/STRONG&gt; = It skips verifying&amp;nbsp;server certificate when connecting to vc.&lt;BR /&gt;&lt;BR /&gt;Eg:&lt;BR /&gt;&amp;gt;&amp;nbsp;python3 ./samples/vsphere/vcenter/vm/list_vms.py -s x.x.x.x -u &lt;A href="mailto:Administrator@vsphere.local" target="_blank"&gt;Administrator@vsphere.local&lt;/A&gt; -p xxxxx&amp;nbsp;&lt;STRONG&gt;--skipverification&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 10:46:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Does-vsphere-automation-sdk-python-require-vddk/m-p/2950179#M2198</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-01-23T10:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rest API to list port groups for a specific cluster?</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Rest-API-to-list-port-groups-for-a-specific-cluster/m-p/2947392#M2173</link>
      <description>&lt;P&gt;Not all vSphere REST APIs are available currently, we may expect them in the next vSphere major releases.&lt;/P&gt;&lt;P&gt;For now to achieve your task use SOAP-based APIs ( vSphere Management SDKs) :&lt;BR /&gt;&lt;BR /&gt;Here is the java sample method using VI Java API:&amp;nbsp;&lt;A href="https://vthinkbeyondvm.com/getting-started-with-vsphere-api-using-java/" target="_self"&gt;Getting started with vSphere API using VI Java&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;public void portgroupList(String vCenterIP, String username, String password, String clusterName) {
		Map&amp;lt;String, String&amp;gt; vssPGs = new HashMap&amp;lt;&amp;gt;();
		Map&amp;lt;String, String&amp;gt; dvsPGs = new HashMap&amp;lt;&amp;gt;();
		try {
			ServiceInstance serviceInstance = new ServiceInstance(new URL("https://" + vCenterIP + "/sdk"), username,
					password, true);
			ClusterComputeResource cls = (ClusterComputeResource) new InventoryNavigator(
					serviceInstance.getRootFolder()).searchManagedEntity("ClusterComputeResource", clusterName);
			HostSystem[] hsArr = cls.getHosts();
			for (HostSystem hs : hsArr) {
				Network[] netArr = hs.getNetworks();
				for (Network net : netArr) {
					if (net.getMOR().getType().equals("Network"))
						vssPGs.put(net.getName(), net.getMOR().getVal());
					else if (net.getMOR().getType().equals("DistributedVirtualPortgroup"))
						dvsPGs.put(net.getName(), net.getMOR().getVal());
				}
			}
			if (!vssPGs.isEmpty()) {
				System.out.println("Virtual Standard Switch portgroups in cluster::" + clusterName);
				vssPGs.forEach((k, v) -&amp;gt; {
					System.out.println(k + " = " + v);
				});
			}
			if (!dvsPGs.isEmpty()) {
				System.out.println("Virtual Distributed Switch portgroups in cluster::" + clusterName);
				dvsPGs.forEach((k, v) -&amp;gt; {
					System.out.println(k + " = " + v);
				});
			}

		} catch (Exception e) {
			System.err.println("Error::" + e.getLocalizedMessage());
		}
	}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2023 09:40:47 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Rest-API-to-list-port-groups-for-a-specific-cluster/m-p/2947392#M2173</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2023-01-08T09:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Security.PasswordQualityControl with esxcli</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Setting-Security-PasswordQualityControl-with-esxcli/m-p/2941040#M2131</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;I could see the option "/Security/PasswordQualityControl" is not available in esxcli/esxcfg-advcfg advanced settings list.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Eg:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;gt; esxcli system settings advanced list | grep Path:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;gt; esxcfg-advcfg -l&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But we can update the advanced setting for "/Security/PasswordQualityControl" using vSphere PowerCLI or SOAP-based APIs or MOB..&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;PowerCLI:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$PasswordPolicy = "retry=3 min=disabled,disabled,disabled,12,8"
$Host1 = Get-VMHost | Where { $_.Name -eq "&amp;lt;host-ip&amp;gt;" }
$Host1 | Get-AdvancedSetting -Name "Security.PasswordQualityControl" | Set-AdvancedSetting -Value $PasswordPolicy -Confirm:$false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;nbsp;VI Java API:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ServiceInstance si = new ServiceInstance(new URL("https://" + vcIPaddress + "/sdk"), userName, password, true);
HostSystem hs = (HostSystem) new InventoryNavigator(si.getRootFolder()).searchManagedEntity("HostSystem","&amp;lt;host-ip&amp;gt;");
OptionManager hom = hs.getOptionManager();
OptionValue[] ovArr = hom.getSetting();
String value = "retry=3 min=disabled,disabled,disabled,disabled,8";
for (OptionValue optionValue : ovArr) {
   if (optionValue.getKey().equals("Security.PasswordQualityControl")) {
		optionValue.setValue(value);
		hom.updateOptions(new OptionValue[] { optionValue });
		break;
   }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Nov 2022 10:37:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Setting-Security-PasswordQualityControl-with-esxcli/m-p/2941040#M2131</guid>
      <dc:creator>doskiran</dc:creator>
      <dc:date>2022-11-28T10:37:00Z</dc:date>
    </item>
  </channel>
</rss>

