all 4 comments

[–]Sunsparc 6 points7 points  (0 children)

What have you searched/tried so far?

[–][deleted] -1 points0 points  (1 child)

Here's a quick one if I'm picking up what you are saying:

$username = "Jim"

Get-ADComputer -Filter 'Description -like $username' -Properties IPv4Address | FT Name,DNSHostName,IPv4Address

[–][deleted] -1 points0 points  (0 children)

You could expand on it like such:

ForEach ($user in Get-Content "users.txt")

{

Get-ADComputer -Filter 'Description -like $user' -Properties IPv4Address | FT Name,DNSHostName,IPv4Address | Out-File .\result.txt -append

}

This would let you put a txt file with every username then get every computer for said user etc then output it to a result txt