New to all of this - this is what I am trying to do with little success, seems like the the ' * ' work then the attribs after the comma does not provide the data nor is it part of the main payload, any help is appreciated:
Get-VM -Server $srv | Select *,
@{N="Running OS";E={$_.Guest.OsFullName}},
@{N="IP Address";E={@($_.guest.IPAddress -join '|')}}
@{N="disktype";E={(Get-Harddisk $_).Storageformat}}
You seem to have forgotten a common at the end of the 3th line.
I'm not sure what you have in $srv, but the following seems to work for when I place a Center to which I'm connected in $srv
@{N="Running OS";E={$_.Guest.OsFullName}},
@{N="IP Address";E={@($_.guest.IPAddress -join '|')}},
@{N="disktype";E={(Get-Harddisk $_).Storageformat}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You seem to have forgotten a common at the end of the 3th line.
I'm not sure what you have in $srv, but the following seems to work for when I place a Center to which I'm connected in $srv
@{N="Running OS";E={$_.Guest.OsFullName}},
@{N="IP Address";E={@($_.guest.IPAddress -join '|')}},
@{N="disktype";E={(Get-Harddisk $_).Storageformat}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok - now I just feel stupid 🙂
Thanks for the catch!
Gary