Powercli-To get VM's VMware tools details in vCenter.
This article describes how to collect vCenter information through powercli command.
Login powercli and run the below details.
# Connect-VIserver
enter the VCSA name
Below command to get all vm's VMware tools version details
# Get-VM | Select-Object -Property Name,@{Name='ToolsVersion';Expression={$_.Guest.ToolsVersion}},@{Name='VMHostVersion';Expression={$_.VMHost.Version}},HardwareVersion,@{Name='GuestFamily';Expression={$_.Guest.GuestFamily}}
For exporting on csv file on location, run the below command.
# Get-VM | Select-Object -Property Name,@{Name='ToolsVersion';Expression={$_.Guest.ToolsVersion}},@{Name='VMHostVersion';Expression={$_.VMHost.Version}},HardwareVersion,@{Name='GuestFamily';Expression={$_.Guest.GuestFamily}} | Export-CSV D:\reports\VMwareToolsStatus.csv
To get VM's VMware tools details in vCenter on specific VM's:-
First of all, collect the required VM's on notepad and save it.
To verify the list of vm's on command.
# Get-Content D:\reports\vmlist
Then, make as following representative command
# $VM = Get-Content D:\reports\vmlist
# Get-VM $VM | Select-Object -Property Name,@{Name='ToolsVersion';Expression={$_.Guest.ToolsVersion}},@{Name='VMHostVersion';Expression={$_.VMHost.Version}},HardwareVersion,@{Name='GuestFamily';Expression={$_.Guest.GuestFamily}} | Export-CSV D:\scripts\VMwareToolsStatus.csv
All vm's information will be save on given path location.
No comments: