Hi guys
I need info about ToolsVersionStatus
like "Running, version:10305 (Upgrade available)" or "Running, version:11333 (Guest Managed)"
can you help me please with my Script ?
$vmNames = get-vm
$vmNames | Select -ExpandProperty $vmNames1
$vmNames = get-content "C:\temp\Scripts\changeCPU\cpu.txt" # (Optional from TXT File)
$Report_All_Info = "C:\temp\Scripts\changeCPU\Report_All_Info.csv"
Get-VM -Name $vmNames -PipelineVariable vm |
Get-NetworkAdapter -PipelineVariable nic |
Select @{N='name';E={$vm.Name}},
@{N = 'PowerState';E={$vm.PowerState}},
@{N = 'Guest OS';E={$vm.Guest.OSFullName}},
@{N = 'Folder';E={$vm.Folder.Name}},
@{N = 'ToolsVersion';Expression={$vm.Guest.ToolsVersion}},
@{N = 'Total_CPU';E={$vm.NumCpu}},
@{N = 'CoresPerSocket';E={$vm.ExtensionData.Config.Hardware.NumCoresPerSocket}},
@{N = 'CPU Per Sockets ';E={$vm.NumCpu/$vm.ExtensionData.Config.Hardware.NumCoresPerSocket}}, #( Calculator the vCPU /CoresPerSocket)
@{N = 'NIC';E={$nic.Name}},
@{N = 'Connected';E={$nic.ConnectionState.Connected}},
@{N = 'IP';E={($vm.Guest.Nics | Where-Object { $_.Device.Name -eq $nic.Name }).IPAddress -join '|'}} |
Export-Csv -Path $Report_All_Info -NoTypeInformation -UseCulture