are those machines on a domain?

Are those machines turned on and reachable?

I’d add a ‘test-connection’ to make sure the computer is available first.

Also, If you post code, please use the ‘Insert Code’ button. Please and thank you!