Thanks so much for replying LuCD . But the vMotoin indeed have come CPU compatibility issue and some VMs have connected CD drive
When I run with these lines
@{N="Warning";E={[string]::Join(',',$_.Warning)}},
@{N="Error";E={[string]::Join(',',$_.Error)}},
Output is
"VM","VMHost","Warning","Error","LinkedView","DynamicType","DynamicProperty"
"TestVM01","ESXhost1.internal.com",,"VMware.Vim.LocalizedMethodFault,VMware.Vim.LocalizedMethodFault",,,
When I run with these lines
@{N="Warning";E={[string]::Join(',',$_.Warning.LocalizedMessage)}},
@{N="Error";E={[string]::Join(',',$_.Error.LocalizedMessage)}}
Output is
"VM","VMHost","Warning","Error","LinkedView","DynamicType","DynamicProperty"
"TestVM01","ESXhost1.internal.com",,,,,