I'm collecting the IP addresses for my VM's. I noticed when I send the output to email I get System.Object[] if there is more than one IP per VM
How would it be possible to collectall IP address of a specfic VM and populate the field appropriately in the email
NOTE: I have this report sent in the body of an EMAIL, when sent via email I get the System.Object error. However, it also is sent to my screen once the script finishes. That one shows the additional IPs as I would expect.
I do not know why one does it and not the other.
This is how I see it when the script finishes on my screen {192.168.3.12, 192.168.4.6}
This is how I see it in the email for the same VM --> System.Object[]
This is how I am getting my IP address....
$reportedvm.IPaddress=$vm.guest.ipAddress |?{$_ -like "*.*"}
Thanks!!!