Hi Lucd,
I am getting error after generating the output in csv format
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> &{Get-V
host | %{
>> $esxcli = Get-esxcli -VMHost $_
>> $esxcli.storage.core.path.list()
>> }} | Export-Csv -path c:\temp\test.csv
>>
Get-EsxCli : 7/8/2014 11:01:54 PM Get-EsxCli Esxcli functionality is
supported for host 'admpls001v.na.corp.cargill.com' only when connected directl
y to it (not through vCenter connection).
At line:2 char:26
+ $esxcli = Get-esxcli <<<< -VMHost $_
+ CategoryInfo : InvalidArgument: (:) [Get-EsxCli], InvalidArgume
nt
+ FullyQualifiedErrorId : Client20_DynamicTypeManagerServiceImpl_GetEsxCli
_RequiredDirectEsxConnection,VMware.VimAutomation.ViCore.Cmdlets.Commands.
GetEsxCli
You cannot call a method on a null-valued expression.
At line:3 char:36
+ $esxcli.storage.core.path.list <<<< ()
+ CategoryInfo : InvalidOperation: (list:String) [], RuntimeExcep
tion
+ FullyQualifiedErrorId : InvokeMethodOnNull
Get-EsxCli : 7/8/2014 11:01:54 PM Get-EsxCli Esxcli functionality is
supported for host 'admpls002v.na.corp.cargill.com' only when connected directl
y to it (not through vCenter connection).
At line:2 char:26
+ $esxcli = Get-esxcli <<<< -VMHost $_
+ CategoryInfo : InvalidArgument: (:) [Get-EsxCli], InvalidArgume
nt
+ FullyQualifiedErrorId : Client20_DynamicTypeManagerServiceImpl_GetEsxCli
_RequiredDirectEsxConnection,VMware.VimAutomation.ViCore.Cmdlets.Commands.
GetEsxCli
You cannot call a method on a null-valued expression.
At line:3 char:36
+ $esxcli.storage.core.path.list <<<< ()
+ CategoryInfo : InvalidOperation: (list:String) [], RuntimeExcep
tion
+ FullyQualifiedErrorId : InvokeMethodOnNull
Get-EsxCli : 7/8/2014 11:05:04 PM Get-EsxCli Esxcli functionality is
supported for host 'admpls030v.na.corp.cargill.com' only when connected directl
y to it (not through vCenter connection).
At line:2 char:26
+ $esxcli = Get-esxcli <<<< -VMHost $_
+ CategoryInfo : InvalidArgument: (:) [Get-EsxCli], InvalidArgume
nt
+ FullyQualifiedErrorId : Client20_DynamicTypeManagerServiceImpl_GetEsxCli
_RequiredDirectEsxConnection,VMware.VimAutomation.ViCore.Cmdlets.Commands.
GetEsxCli
You cannot call a method on a null-valued expression.
At line:3 char:36
+ $esxcli.storage.core.path.list <<<< ()
+ CategoryInfo : InvalidOperation: (list:String) [], RuntimeExcep
tion
+ FullyQualifiedErrorId : InvokeMethodOnNull
Get-EsxCli : 7/8/2014 11:05:04 PM Get-EsxCli Esxcli functionality is
supported for host 'admpls031v.na.corp.cargill.com' only when connected directl
y to it (not through vCenter connection).
At line:2 char:26
+ $esxcli = Get-esxcli <<<< -VMHost $_
+ CategoryInfo : InvalidArgument: (:) [Get-EsxCli], InvalidArgume
nt
+ FullyQualifiedErrorId : Client20_DynamicTypeManagerServiceImpl_GetEsxCli
_RequiredDirectEsxConnection,VMware.VimAutomation.ViCore.Cmdlets.Commands.
GetEsxCli
You cannot call a method on a null-valued expression.
At line:3 char:36
+ $esxcli.storage.core.path.list <<<< ()
+ CategoryInfo : InvalidOperation: (list:String) [], RuntimeExcep
tion
+ FullyQualifiedErrorId : InvokeMethodOnNull
Thanks
vmk2014