WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / vCenter Server 6.0 Tidbits Part 8: Useful ldapsearch queries for vmdird

vCenter Server 6.0 Tidbits Part 8: Useful ldapsearch queries for vmdird

05.06.2015 by William Lam // Leave a Comment

Last week I demonstrated how you can connect to the VMware Directory Service (vmdird) in vSphere 6.0 using JXPlorer, a graphical LDAP browser to extract useful information such as all the deployed vCenter Servers and Platform Services Controllers in your environment. I have also shown in past articles on how you can also retrieve this information programmatically which I have described here and here. Since vmdird is an LDAP-based system, we can also easily retrieve this information using simple LDAP commands that you may already be familiar with.

Disclaimer: Please take extreme caution when connecting to the vmdird database, this is primary for educational purposes. You should take extreme care in making changes while in the database else you can negatively impact your environment.

For performing search queries within an LDAP system, we can use the ldapsearch command which is available among other commands within the VCSA as well as other *NIX based system including Mac OS X. You can use this command to connect to both Windows and the VCSA running either an Embedded deployment or just the Platform Services Controller services.

Below are three useful ldapserach queries for identifying all deployed vCenter Servers and Platform Services Controllers including the SSO Site Name. The parameters highlighted below in blue will need to be modified based on your environment. The -h parameter specifies the Hostname/IP Address of your PSC, the -w parameter is the SSO Administrator password and the dc property is the name of SSO Domain.

Finding all deployed vCenter Servers:

/opt/likewise/bin/ldapsearch -h psc-01.primp-industries.com -w 'VMware1!' -x -D "cn=Administrator,cn=Users,dc=vghetto,dc=local" -b "ou=Computers,dc=vghetto,dc=local" -s one "objectclass=computer" cn

useful-ldapqueries-to-platform-services-controller-0
Finding all deployed Platform Service Controllers:

/opt/likewise/bin/ldapsearch -h psc-01.primp-industries.com -w 'VMware1!' -x -D "cn=Administrator,cn=Users,dc=vghetto,dc=local" -b "ou=domain controllers,dc=vghetto,dc=local" -s one "objectclass=computer" cn

useful-ldapqueries-to-platform-services-controller-1
Finding SSO Site Name:

/opt/likewise/bin/ldapsearch -h psc-01.primp-industries.com -w 'VMware1!' -x -D "cn=Administrator,cn=Users,dc=vghetto,dc=local" -b "cn=Sites,cn=Configuration,dc=vghetto,dc=local" "objectclass=container"

useful-ldapqueries-to-platform-services-controller-2

  • vCenter Server 6.0 Tidbits Part 1: What install & deployment parameters did I use?
  • vCenter Server 6.0 Tidbits Part 2: What is my SSO Domain Name & Site Name?
  • vCenter Server 6.0 Tidbits Part 3: Finding all deployed Platform Services Controller
  • vCenter Server 6.0 Tidbits Part 4: Finding all deployed vCenter Servers
  • vCenter Server 6.0 Tidbits Part 5: New method of patching the VCSA
  • vCenter Server 6.0 Tidbits Part 6: Customizing VCSA’s DCUI
  • vCenter Server 6.0 Tidbits Part 7: Connecting to SSO/PSC using JExplorer
  • vCenter Server 6.0 Tidbits Part 8: Useful ldapsearch queries for vmdird
  • vCenter Server 6.0 Tidbits Part 9: Creating & managing SSO users using dir-cli
  • vCenter Server 6.0 Tidbits Part 10: Automating SSO Admin configurations
  • vCenter Server 6.0 Tidbits Part 11: Automate SSO Admin password change
  • vCenter Server 6.0 Tidbits Part 12: New methods of downloading Support Bundles for VCSA / PSC

More from my site

  • vCenter Server 6.0 Tidbits Part 10: Automating SSO Admin configurations
  • Which Platform Services Controller (PSC) is my vCenter Server pointing to?
  • vCenter Server 6.0 Tidbits Part 2: What is my SSO Domain Name & Site Name?
  • How to change the default ports on the vCenter Server Appliance in vSphere 6.0?
  • How to automatically repoint & failover VCSA to another replicated Platform Services Controller (PSC)?

Categories // Automation, VCSA, vSphere 6.0 Tags // ldapsearch, platform service controller, psc, vCenter Server, vcenter server appliance, VCSA, vcva

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...