Reputation: 921
When I run my script I get results that look like this
Computername IPAddress Date
------------ --------- ----
testdns100 10.50.21.210 11/15/2013 14:00
When I do a write-host or something similar, since I want to send the result out via email I get an output like this
@{Computername=testdns100; IPAddress=10.50.21.210; Date=11/15/2013 14:00}
Whats the best way for me to keep the output in the table format?
Upvotes: 0
Views: 77
Reputation: 68341
For email, the easist way I know is to run it through Format-Table, then Out-string:
$Body = $Objects | Format-Table | Out-String
Upvotes: 1