After converting this table to a string, the columns are no longer aligned correctly. The data in the columns are, but the 3 columns themselves are not. Ideally I would want them aligned to the left. Is there any way to fix this? The reason I converted to a string is to eliminate unneeded space.
(Get-EventLog system -computername $computernamehere -InstanceId 2147489657 -Newest 10 `
| Format-Table `
@{Name="Event ID";Expression = { $_.EventID }; Alignment="left" },
@{Name="TimeWritten";Expression = { $_.TimeWritten }; Alignment="left" },
@{Name="Machine Name";Expression = { $_.MachineName }; Alignment="left" } `
| Out-String).Trim()