foreach($line in Get-Content .\CaseList.txt) { Get-ASACommunication -CaseId $line -region us-east-1 > $line".txt"   }