Powershell VMWare Get-VM query is returning different results on 2 systems

Hello,

i am a bit lost.

I am trying to retrieve VM information of a vCenter 6.0 by this script:

$user60 = 'xxxx@xxxx'
$pswd60 = 'xxxx'
$ESXName60 = '10.116.219.9'

$srv60 = Connect-VIServer -Server $ESXName60 -Protocol https -User $user60 -Password $pswd60

Get-VM | 
Select Name,
@{N="Datastore";E={[string]::Join(',',(Get-Datastore -Id $_.DatastoreIdList | Select -ExpandProperty Name))}},
@{N="VMHost";E={$_.VMHost}}, 
@{N="OS";E={$_.Guest.OSFullName}} | where {$_.Name.Contains("otn-ac-bck") } #| Export-Csv -Path $FileExportPath -NoTypeInformation

Disconnect-VIServer -Server $srv60 -Confirm:$false

On the Windows system this is the output including Datastore, VMHost and OS.

PS C:\WINDOWS\system32>> Z:\Scripts\VMware-Scripts\6.0\GetAllVMs.ps1
Name            Datastore                     VMHost                                        OS                                    
----            ---------                     ------                                        --                                    
otn-ac-bck-cp05 OTN_CLOUD_iSCSI_VSA_01        otn-cloud-m02.local   Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-cp11 DCC2-NFS-VMdatastore-DeDup-01 otn-ac-esxs-b06.local Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-cp09 DCC2-NFS-VMdatastore-DeDup-01 otn-cloud-w03.local   Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-cp10 DCC2-NFS-VMdatastore-DeDup-04 otn-cloud-w02.local   Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-cp07 DCC2-NFS-VMdatastore-DeDup-06 otn-ac-esxh-f03.local                                       
otn-ac-bck-cp08 DCC2-NFS-VMdatastore-DeDup-02 otn-ac-esxs-b02.local Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-atmp DCC2-NFS-VMdatastore-DeDup-04 otn-cloud-w06.local   Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-cp12 DCC2-NFS-VMdatastore-DeDup-02 otn-ac-esxs-b08.local Microsoft Windows Server 2016 (64-bit)
otn-ac-bck-cp06 DCC2-NFS-MGMTdatastore-DeD... otn-cloud-m01.local   Microsoft Windows Server 2016 (64-bit)

On the Centos system the values for all columns except of “Name” is missing, although the script is identical!
pwsh GetAllVMs.ps1

Name            Datastore VMHost OS
----            --------- ------ --
otn-ac-bck-cp05                    
otn-ac-bck-cp11                    
otn-ac-bck-cp09                    
otn-ac-bck-cp10                    
otn-ac-bck-cp07                    
otn-ac-bck-cp08                    
otn-ac-bck-atmp                    
otn-ac-bck-cp12                    
otn-ac-bck-cp06                    

Windows 10:

Version

Name                           Value                                                                                                                                                              
----                           -----                                                                                                                                                              
PSVersion                      5.1.19041.1682                                                                                                                                                     
PSEdition                      Desktop                                                                                                                                                            
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                            
BuildVersion                   10.0.19041.1682                                                                                                                                                    
CLRVersion                     4.0.30319.42000                                                                                                                                                    
WSManStackVersion              3.0                                                                                                                                                                
PSRemotingProtocolVersion      2.3                                                                                                                                                                
SerializationVersion           1.1.0.1       

Modules

ModuleType Version    Name                                ExportedCommands                                                                                                                        
---------- -------    ----                                ----------------                                                                                                                        
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}                                                                                   
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}                                                                  
Script     3.4.0      Pester                              {Describe, Context, It, Should...}                                                                                                      
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}                                                                            
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...}                              
Binary     2.1.0.1    PSWindowsUpdate                     {Add-WUServiceManager, Enable-WURemoting, Get-WindowsUpdate, Get-WUApiVersion...}                                                       
Script     12.2.0.... VMware.CloudServices                {Connect-Vcs, Disconnect-Vcs, Get-VcsOrganizationRole, Get-VcsService...}                                                               
Script     7.0.0.1... VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule...}                                                                 
Script     7.0.0.1... VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile...}                                      
Manifest   12.2.0.... VMware.PowerCLI                                                                                                                                                             
Script     7.0.1.1... VMware.Vim                                                                                                                                                                  
Script     12.2.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}                                                                               
Script     12.0.0.... VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}                                                                
Script     12.2.0.... VMware.VimAutomation.Common         {Get-PowerCLIContext, Get-Task, New-OAuthSecurityContext, Stop-Task...}                                                                 
Script     12.2.0.... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}                                    
Script     12.2.0.... VMware.VimAutomation.Hcx            {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfile...}                                                   
Script     12.2.0.... VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}                                                                                                 
Script     12.0.0.... VMware.VimAutomation.License        Get-LicenseDataManager                                                                                                                  
Script     12.2.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtGlobalManagerService, Get-NsxtPolicyService...}                                     
Script     12.2.0.... VMware.VimAutomation.Sdk            {Get-ErrorReport, Get-PSVersion, EnableParameterCompleters, Get-InstallPath}                                                            
Script     12.1.0.... VMware.VimAutomation.Security       {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderServer, Add-TrustAuthorityKeyProviderServerCert...
Script     12.2.0.... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}                                                                                               
Script     12.2.0.... VMware.VimAutomation.Storage        {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-VsanObjectToRepairQueue...}                         
Script     1.6.0.0    VMware.VimAutomation.StorageUtility Update-VmfsDatastore                                                                                                                    
Script     12.2.0.... VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch...}                                        
Script     12.2.0.... VMware.VimAutomation.Vmc            {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}                                                                       
Script     12.2.0.... VMware.VimAutomation.vROps          {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}                                                          
Script     12.2.0.... VMware.VimAutomation.WorkloadMan... {Disable-WMCluster, Enable-WMCluster, Get-WMCluster, Get-WMNamespace...}                                                                
Script     12.1.0.... VMware.VumAutomation                {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}    

CentOS 7:

Version

(Already tried version 7, but can’t go lower than 6.0.4)

Name                           Value                                                                                                                                                         
----                           -----                                                                                                                                                         
PSVersion                      6.0.4                                                                                                                                                         
PSEdition                      Core                                                                                                                                                          
GitCommitId                    v6.0.4                                                                                                                                                        
OS                             Linux 3.10.0-1160.53.1.el7.x86_64 #1 SMP Fri Jan 14 13:59:45 UTC 2022                                                                                         
Platform                       Unix                                                                                                                                                          
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                       
PSRemotingProtocolVersion      2.3                                                                                                                                                           
SerializationVersion           1.1.0.1                                                                                                                                                       
WSManStackVersion              3.0                

Modules

ModuleType Version    Name                                ExportedCommands                                                                                                                   
---------- -------    ----                                ----------------                                                                                                                   
Script     12.6.0.... VMware.CloudServices                {Connect-Vcs, Disconnect-Vcs, Get-VcsOrganizationRole, Get-VcsService...}                                                          
Script     7.0.3.1... VMware.DeployAutomation             {Add-CustomCertificate, Add-DeployRule, Add-ProxyServer, Add-ScriptBundle...}                                                      
Script     7.0.3.1... VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile...}                                 
Manifest   12.7.0.... VMware.PowerCLI                                                                                                                                                        
Script     12.6.0.... VMware.PowerCLI.Sdk                                                                                                                                                    
Script     12.6.0.... VMware.PowerCLI.Sdk.Types                                                                                                                                              
Script     12.6.0.... VMware.PowerCLI.VCenter             {Get-VIMachineCertificate, Get-VITrustedCertificate, Remove-VITrustedCertificate, New-VIMachineCertificateSigningRequest...}       
Script     12.6.0.... VMware.PowerCLI.VCenter.Types.Ap...                                                                                                                                    
Script     12.6.0.... VMware.PowerCLI.VCenter.Types.Ce...                                                                                                                                    
Script     4.0.0.2... VMware.Sdk.Nsx.Policy               {Connect-NsxServer, Connect-NsxVmcServer, Disconnect-NsxServer, Disconnect-NsxVmcServer...}                                        
Script     1.0.106... VMware.Sdk.Runtime                  {Get-ServerConfiguration, New-ServerConfiguration, Add-ServerConfiguration, Set-ServerConfiguration...}                            
Manifest   1.0.104... VMware.Sdk.vSphere                                                                                                                                                     
Script     3.0.104... VMware.Sdk.vSphere.Appliance        {Invoke-GetItemHealthMessages, Invoke-GetHealthSettings, Invoke-UpdateHealthSettings, Invoke-CreateLocalAccounts...}               
Script     2.0.104... VMware.Sdk.vSphere.Appliance.Access {Invoke-GetAccessConsolecli, Invoke-SetAccessConsolecli, Invoke-GetAccessDcui, Invoke-SetAccessDcui...}                            
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Health {Invoke-GetHealthApplmgmt, Invoke-GetHealthDatabase, Invoke-GetHealthDatabaseStorage, Invoke-GetHealthLoad...}                     
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Inf... {Invoke-ExportInfraprofileConfigs, Invoke-ImportInfraprofileConfigsAsync, Invoke-ListInfraprofileConfigs, Invoke-ValidateInfrapr...
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Loc... {Invoke-GetLocalAccountsGlobalPolicy, Invoke-SetLocalAccountsGlobalPolicy, Initialize-LocalAccountsPolicyInfo}                     
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Log... {Invoke-GetLoggingForwarding, Invoke-SetLoggingForwarding, Invoke-TestLoggingForwarding, Initialize-LoggingForwardingConfig...}    
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Net... {Invoke-CreateNetworkingDnsDomains, Invoke-ListNetworkingDnsDomains, Invoke-SetNetworkingDnsDomains, Invoke-GetNetworkingDnsHost...
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Rec... {Invoke-GetSystemNameArchive, Invoke-ListSystemNameArchives, Invoke-ValidateRecoveryBackup, Invoke-ListBackupJobDetails...}        
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Sup... Invoke-GetSupportBundleComponents                                                                                                  
Script     1.0.104... VMware.Sdk.vSphere.Appliance.System {Invoke-GetSystemGlobalFips, Invoke-SetSystemGlobalFips, Invoke-ListSystemStorage, Invoke-ResizeExSystemStorage...}                
Script     1.0.104... VMware.Sdk.vSphere.Appliance.Update {Invoke-InstallVersionPending, Invoke-ListUpdatePending, Invoke-PrecheckVersionPending, Invoke-StageAndInstallVersionPending...}   
Script     1.0.104... VMware.Sdk.vSphere.Cis              {Invoke-CreateSession, Invoke-DeleteSession, Invoke-GetSession, Invoke-CancelTask...}                                              
Script     1.0.104... VMware.Sdk.vSphere.Cis.Tagging      {Invoke-AddToUsedByCategoryId, Invoke-CreateCategory, Invoke-DeleteCategoryId, Invoke-GetCategoryId...}                            
Script     1.0.104... VMware.Sdk.vSphere.Content          {Invoke-GetContentConfiguration, Invoke-UpdateContentConfiguration, Invoke-FindContentLibrary, Invoke-GetLibraryIdContent...}      
Script     1.0.104... VMware.Sdk.vSphere.ContentLibrary   {Invoke-GetLibraryItemVersionLibraryChanges, Invoke-ListLibraryItemContentChanges, Invoke-CancelDownloadSessionId, Invoke-Create...
Script     1.0.104... VMware.Sdk.vSphere.Esx.Hcl          {Invoke-DownloadHclCompatibilityDataAsync, Invoke-GetHclCompatibilityDataStatus, Invoke-ListHostHclCompatibilityReleases, Invoke...
Script     1.0.104... VMware.Sdk.vSphere.Esx.Hosts        {Invoke-ListHostSoftwareInstalledComponents, Invoke-GetSoftware, Initialize-HostsSoftwareHostCredentials}                          
Script     1.0.104... VMware.Sdk.vSphere.Esx.Settings     {Invoke-DeleteClusterDraftSoftwareAddOn, Invoke-GetClusterDraftSoftwareAddOn, Invoke-GetClusterSoftwareAddOn, Invoke-SetClusterD...
Script     1.0.104... VMware.Sdk.vSphere.VAPI.Metadata    {Invoke-GetCliCommand, Invoke-GetCliCommandFingerprint, Invoke-ListMetadataCliCommand, Invoke-GetComponentIdAuthentication...}     
Script     1.0.104... VMware.Sdk.vSphere.vCenter          {Invoke-GetCluster, Invoke-ListCluster, Invoke-CreateDatacenter, Invoke-DeleteDatacenter...}                                       
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Authe... Invoke-CreateAuthenticationToken                                                                                                   
Script     1.0.104... VMware.Sdk.vSphere.vCenter.CertM... {Invoke-GetCertificateManagementSigningCertificate, Invoke-RefreshSigningCertificate, Invoke-SetCertificateManagementSigningCert...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Content  {Invoke-CreateContentRegistriesHarbor, Invoke-DeleteRegistryRegistriesHarbor, Invoke-GetRegistryRegistriesHarbor, Invoke-ListCon...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Datas... Invoke-GetDatastoreDefaultPolicy                                                                                                   
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Deplo... {Invoke-CheckMigrateActiveDirectory, Invoke-CancelDeploymentHistory, Invoke-GetDeploymentHistory, Invoke-PauseDeploymentHistory...}
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Guest    {Invoke-CreateGuestCustomizationSpecs, Invoke-DeleteNameGuestCustomizationSpecs, Invoke-ExportNameCustomizationSpecs, Invoke-Get...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Identity {Invoke-CreateIdentityProviders, Invoke-DeleteProviderIdentity, Invoke-GetProviderIdentity, Invoke-ListIdentityProviders...}       
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Inven... {Invoke-GetInventoryDatastore, Invoke-GetInventoryNetwork}                                                                         
Script     1.0.104... VMware.Sdk.vSphere.vCenter.ISO      {Invoke-MountIsoImage, Invoke-UnmountIsoImage, Initialize-IsoImageMountRequestBody, Initialize-IsoImageUnmountRequestBody}         
Script     1.0.104... VMware.Sdk.vSphere.vCenter.LCM      {Invoke-CreateLcmDiscoveryAssociatedProducts, Invoke-DeleteProductDiscoveryAssociatedProducts, Invoke-GetProductDiscoveryAssocia...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Names... {Invoke-ListNamespaceManagementSoftwareClusterAvailableVersions, Invoke-ListNamespaceManagementClusterCompatibility, Invoke-Disa...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Names... {Invoke-CreateNamespaceDomainSubjectAccess, Invoke-DeleteNamespaceDomainSubjectAccess, Invoke-GetNamespaceDomainSubjectAccess, I...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.OVF      {Invoke-ListOvfExportFlag, Invoke-ListOvfImportFlag, Invoke-CreateOvfLibraryItem, Invoke-DeployOvfLibraryItemId...}                
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Services {Invoke-GetService, Invoke-GetServices, Invoke-RestartService, Invoke-StartService...}                                             
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Storage  {Invoke-ListPoliciesEntitiesCompliance, Invoke-CheckCompatibilityPolicyPolicies, Invoke-ListStoragePolicies, Invoke-ListPolicies...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Syste... {Invoke-GetSystemConfigDeploymentType, Invoke-SetSystemConfigDeploymentType, Invoke-GetSystemConfigPscRegistration, Invoke-Repoi...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Tagging  Invoke-ListAssociations                                                                                                            
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Topology {Invoke-GetNodeTopology, Invoke-ListTopologyNodes, Invoke-ListTopologyReplicationStatus}                                           
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Trust... {Invoke-CreateTrustedInfrastructureTrustAuthorityHostsAttestation, Invoke-GetHostTrustedInfrastructureAttestation, Invoke-Delete...
Script     1.0.104... VMware.Sdk.vSphere.vCenter.VCHA     {Invoke-GetClusterActive, Invoke-DeployVchaClusterAsync, Invoke-FailoverVchaClusterAsync, Invoke-GetVchaCluster...}                
Script     1.0.104... VMware.Sdk.vSphere.vCenter.Vm       {Invoke-GetVmHardwareBoot, Invoke-UpdateVmHardwareBoot, Invoke-ConnectVmCdrom, Invoke-CreateVmHardwareCdrom...}                    
Script     1.0.104... VMware.Sdk.vSphere.vCenter.VmTem... {Invoke-CheckInTemplateLibraryItemVmCheckOuts, Invoke-CheckOutTemplateLibraryItemCheckOuts, Invoke-DeleteTemplateLibraryItemVmVm...
Script     1.0.104... VMware.Sdk.vSphere.vStats           {Invoke-CreateStatsAcqSpecs, Invoke-DeleteIdStatsAcqSpecs, Invoke-GetIdStatsAcqSpecs, Invoke-ListStatsAcqSpecs...}                 
Script     1.0.104... VMware.Sdk.vSphereRuntime           {New-vSphereServerConfiguration, Get-vSphereServerConfiguration, Set-vSphereServerConfiguration, Set-vSphereServerConfigurationA...
Script     7.0.3.1... VMware.Vim                                                                                                                                                             
Script     12.6.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}                                                                          
Script     12.0.0.... VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}                                                           
Script     12.7.0.... VMware.VimAutomation.Common         {Get-PowerCLIContext, Get-Task, New-OAuthSecurityContext, Stop-Task...}                                                            
Script     12.7.0.... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}                               
Script     12.7.0.... VMware.VimAutomation.Hcx            {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfile...}                                              
Script     12.7.0.... VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}                                                                                            
Script     12.0.0.... VMware.VimAutomation.License        Get-LicenseDataManager                                                                                                             
Script     12.5.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtGlobalManagerService, Get-NsxtPolicyService...}                                
Script     12.7.0.... VMware.VimAutomation.Sdk            {Get-ErrorReport, Get-InstallPath, Get-PSVersion, EnableParameterCompleters}                                                       
Script     12.3.0.... VMware.VimAutomation.Security       {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderServer, Add-TrustAuthorityKeyProviderServe...
Script     12.7.0.... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}                                                                                          
Script     12.7.0.... VMware.VimAutomation.Storage        {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-VsanObjectToRepairQueue...}                    
Script     1.6.0.0    VMware.VimAutomation.StorageUtility Update-VmfsDatastore                                                                                                               
Script     12.7.0.... VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch...}                                   
Script     12.7.0.... VMware.VimAutomation.Vmc            {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}                                                                  
Script     12.5.0.... VMware.VimAutomation.vROps          {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}                                                     
Script     12.4.0.... VMware.VimAutomation.WorkloadMan... {Disable-WMCluster, Enable-WMCluster, Get-WMCluster, Get-WMNamespace...}                                                           
Script     12.7.0.... VMware.VumAutomation                {Add-EntityBaseline, Copy

Without having any experiences with PWSH on Linux or VMWare vCenter …

What have you tried to debug the script on Linux? Did you get errors?

@Olaf I have tried different queries on the Linux PowerShell but nothing did help. :frowning:

Usually we run the code line by line in order to debug it and inspect the output in the console. … did you get any error?

What’s the output when you reduce the query to this:

Get-VM | 
Select-Object -Property Name, VMHost

?

@Olaf
no there is no error.

Executing the query above on CentOS 7 returns the output without any “VMHost” values…

Name                                        VMHost
----                                        ------
0bb40171-9e7f-46a6-9930-ed5205d951b8              
d5cd76c6-cdb8-40d3-bde5-fc8f074e505c              
6991c3d1-a08b-4594-abad-f8ac3dbd092d              
11b67df3-708c-491a-a770-82898dc1f20f              
....

hmmm … weird …

and how about this?

Get-VM | 
Select-Object -Property *