0

I've got a Powershell script that extracts the disk usage per VM directly from the VSAN system by directly accessing the ESXi Hosts in the cluster. It currently:

  1. Connects to the ESXi host with its credentials
  2. Extracts the VSAN object system on that host
  3. Iterates through it to extract the VM UUID, overhead for that VM, physical used capacity, etc.

For security reasons, I will no longer be able to connect directly to the ESXi systems with their credentials. I still have access to the vCenter server, however it is a requirement that the VSAN data comes from VSAN itself, not from the vCenter. Is there any way to do this?

Thanks in advance for any advice!

I've tried pulling the data directly from the vCenter, but I've been told that sometimes this data can vary, and for the type of analysis we're doing, that is not allowed.

  • What exactly do you mean with "connect directly to the ESXi". SSH? DCUI? API? If only SSH gets blocked in the future, you can still access all info via API. – stackprotector Jun 08 '23 at 08:59
  • Most servers are moving from Windows Credentials to OAUTH 2. You need a credential. There are many types of credentials and you should be able to run command if you update the credential method. – jdweng Jun 08 '23 at 10:02
  • I am trying to connect using Connect-VIServer in powershell and making the host the target. @stackprotector could you elaborate on getting the info from the API? I'm still learning this stuff, I appreciate all your comments! – Synovialbasher Jun 08 '23 at 14:02
  • The PowerCLI cmdlets use the API. How will this no longer be possible in the future? Will the ESXi hosts be in lockdown mode? – stackprotector Jun 11 '23 at 09:02

0 Answers0