I m using this Dbatools powershell command to select a table from two same database in both instance as below
Query: SELECT TOP (1000) [name]
,[age]
,[where]
FROM [AdventureWorks2017].[dbo].[table11]
Command:
Invoke-DbaQuery -ServerInstance $InstanceList -Query $sql -AppendServerInstance | Out-File C:\b2\output1.txt
and the results I get is this
for every server in the list, I need it to have separate column name , I m supposed to get results as below
Appreciate your expertise to advice me what need to add in the scripts

