Instead of dropping in a bunch of computer names into a file, I strongly encourage you to think about how you’re getting those computer names and set that criteria in the script.
The Windows registry can be a goldmine for attackers and clueless employees. There’s no place better suited for introducing security vulnerabilities or completely screwing up a Windows system than the registry.