Hi! I found this script show me all information about OSFULL NAME and grouping!!
But now i need show name 115 vm without information
Get-VM |Select Name,
@{N="S.O";E={$_.Guest.OSFullName}}|
group-object -property "S.O"|Select Count,Name|ConvertTo-HTML -title "Relação de Servidores - VMWARE" -body "<H2>Relação de Servidores - VMWARE</H2>" -head $aforma| Out-File Agrupadas.html
52 | Ubuntu Linux (64-bit) |
115 | |
34 | Microsoft Windows Server 2003 (32-bit) |
5 | CentOS 4/5/6 (32-bit) |
Tks for all help!
Those are most probably VMs that are not powered on or where the VMware Tools are not installed/running.
You can list the general OS the creator of the VM selected when he created the VM, but that is not conclusive to confirm that a specific OS is actually running on the VM.
I could easily say I'm creating a Windows VM, but install a Linux distro on there.
Get-VM | Group-Object -property {$_.ExtensionData.Config.GuestId}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That code appears to use tools to find within the guest OS which requires tools. You can use the other object to find out what the configured OS is for the VMX, but it might not match to what is within the OS.
Get-VM |Select Name,
@{N="S.O";E={$_.ExtensionData.config.GuestFullName}}|
group-object -property "S.O"|Select Count,Name|ConvertTo-HTML -title "Relação de Servidores - VMWARE" -body "<H2>Relação de Servidores - VMWARE</H2>" -head $aforma| Out-File Agrupadas.html
EDIT: Luc to fast for me again :smileysilly:
Message was edited by: Mark Jones