Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #vairables
- $users = Get-Content "C:\test\fullnames.txt"
- #script
- foreach ($user in $users) {
- Get-ADComputer -Filter {Description -Like '*$user*'} -Property Name,Description | Select Name,Description | Export-Csv "C:\test\CompName.csv" -NoTypeInformation
- }
Advertisement
Add Comment
Please, Sign In to add comment