I'm using PS to connect to an Oracle DB, run a query, then email me the results (when results exist). Everything is working properly, except that the output is one long string. If I write the output in PS itself, it looks fine (see below). I tried formatting $body as a table, but I'm clearly missing something... probably because this script is the combination of three different scripts that I found.
From PS:
Powershell
PSC:\Users\aaronh#Must use 32bit version of PowerShellPSC:\Users\aaronhAdd-Type-AssemblySystem.Data.OracleClientPSC:\Users\aaronhPSC:\Users\aaronh$connectionString=“DataSource=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX.XXX.XXX.XXX)(PORT=XXXX)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXXX)));UserId=XXXX;Password=XXXX;IntegratedSecurity=no”PSC:\Users\aaronhPSC:\Users\aaronh...