Is there a way to find out the IP addresses of all the computers on the subnet my script is running on?

Look here for some discussion and examples on the topic. You would have to try each node one at a time, but that's what computers are for...

Of course your computer may have multiple NICs and therefore multiple subnets to talk to.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.