SQL Server – MS SQL Results as a text file that PowerShell can access and use the text file

The query below creates a text file with a list of server names. The problem I have is that the text file is created server, server, server, and so on.
I need it
Server
Server
Server

                                                                TO START
CREATE THE TABLE [TempPSWmiObjectQuery]
                (QueryText nvarchar (max))
END

INSERT IN [TempPSWmiObjectQuery]

             SELECT STUFF ((SELECT character (13) + character (10)),
SUBSTRING (ServerName, 1, CASE WHEN CHARINDEX (& # 39;, & # 39; ServerName)> 0 THEN
CHARINDEX (, ###, Server Name) -1
ELSE LEN (ServerName)
END)
DE MasterList
FOR XML PATH (& # 39;)), 1, 1, & # 39;)

EXEC sp_configure & # 39; xp_cmdshell & # 39 ;, 1;
RECONFIGURE

EXEC xp_cmdshell & # 39; bcp SQLEnv.dbo.TempPSWmiObjectQuery out "\ Server Name  Data  temp  testlist.txt" -c -T -S "Server Name  Instance" & # 39;

EXEC sp_configure & # 39; xp_cmdshell & # 39; 0;
RECONFIGURE

DROP TABLE TempPSWmiObjectQuery

PowerShell Script

                                $ StagingServer = "ServerName  InstanceName"
$ StagingServerDatabase = "SQLEnv"

foreach ($ line in 
    [System.IO.File]:: ReadLines ("\ Servername  Data  temp  testlist.txt"))
{
$ line
Get-WmiObject win32_Service -Computer $ line | where {$ _. DisplayName
-match "SQL Server"} | select SystemName, DisplayName, Name, State,
Status, StartMode, StartName | ConvertTo-DbaDataTable | To write-
DbaDataTable -SqlInstance $ StagingServer -Database
$ StagingServerDatabase -Table _SQLServicesInfo -AutoCreateTable -Confirm

}