How to check Esxi server Version with powershell for VM?

scene:I have a Esxi server and running a guest OS(windows 2008 R2),how to run command that check Esxi version in the guest OS?

I’m not sure the guest can easily do that. It doesn’t “know” it’s a guest. You could easily check the version of the VMware Additions executable, but apart from that you’d have to install PowerCLI inside the guest and then query the server directly, just as you’d do from a remote machine.