You should keep searching. There are thousands of examples for tasks like this available even here on Powershell.org.
The get an AD computer object you can use Get-ADComputer and to set an AD computer object you can use Set-ADComputer. I assume your TXT file is actually a CSV file. So you can use Import-CSV to read the content. Then you use a loop either with foreach or Foreach-Object to glue everything together.
Please, always read the complete help including the examples for the cmdlets you’re about to use to learn how to use them. Another great source for scripts or modules is the PowershelLGallery or StackOverflow. You can learn how to code in Powershell when you analyze the code others share with the world.
Did you actually read my answer? Get-Content -> Import-CSV !!! And you actually don’t need Get-ADComputer when your CSV file contains the correct name of the computer account.