If I connect to a single ESXi host using SSH and run the command ntpq -p, I get the output as below :
I know I can get the configured NTP server and the service running status using RV Tools however I am looking for a script to pull all the details seen in the above screenshot from all the ESXi hosts in a vCenter. I am not good in scripting and still learning it.
Can anyone please help me with a script so that I can connect to the vCenter and run that to get the output in a file for all the hosts ?
Any help would be really appreciable.
Thanks in advance!
Those are quite a few errors.
First let us find out what environment you are using.
Run the following
Get-Module -Name VMware.PowerCLI -ListAvailable
Did you actually install the module Posh-SSH from the PowerShell Gallery?
If nothing is returned, do a
Seems the Posh-SSH module is not installed and the Jump box don't have the internet connectivity:
I have manually downloaded the .nupkg for Posh-SSH. Do i need to import it in PowerCli ?
Wow....It worked, finally got what I was looking for in the report.
I put the extracted module in the module path, that's it.
Thank you so much....really appreciate your efforts in this, considering I didn't know much about scripting.