When I tried the above script it was giving Warning and Errors as "VMware.Vim.LocalizedMethodFault".
Hence, I used
@{N="Warning";E={[string]::Join(',',$_.Warning.LocalizedMessage)}},
@{N="Error";E={[string]::Join(',',$_.Error.LocalizedMessage)}},
But this was giving blanks.
Can we try to get the actual warning and errors messages. Please help.