Your script has multiple problems. Download this PDF and use it as a reference.
https://www.sapien.com/books_training/Windows-PowerShell-4
Try this.
$computers = Get-Content "C:\scripts\Servers1.txt"
$Report = @()
foreach ($computer in $computers) {
"Processing $computer"
Get-CimInstance -ComputerName $computer win32_userprofile | select localpath, sid | foreach {
$Report += [PSCustomObject]@{
Computer = $computer;
LocalPath = $_.localpath;
SID = $_.sid
}
}
}
"Here is the report."
$Report
$Report | Export-Csv -Path '\\powerserver\C$\Temp\ServerUsers\Report.csv' -NoTypeInformation