Hi,
I try get computer name by description
but it not working correct
it get just last name from my list
This my code:
$username = Get-Content “C:\Users.txt”
You’re calling Export-Csv inside a loop without the -Append switch, which will just keep overwriting the file. One alternative is to turn this into a single pipeline with Export-Csv at the end (so it’s only called once, but receives multiple input objects):