To generate a list of computers that are turned on, (in a batch file use %%A rather than %A when typing interactively)
for /f "skip=3 delims=\" %A in ('net view ^| findstr /v /C:"The command completed successfully"') do Echo %A >> "%userprofile%\desktop\computername.txt"
To run a program use (NB: remote programs are invisible on the remote computer because you can't interfere with a user). Note the use of double backslashes for the command line.
wmic /node:@"%userprofile%\desktop\computername.txt" /failfast:on process call create "c:\\windows\\notepad.exe"
See wmic /?, wmic process /?, wmic process get /?, wmic process set /?, wmic process call /?, wmic /format /?, wmic /node /?, and wmic /failfast /?. Also for /?, net help view (net view /? is short help) and findstr /?.
To see what punctuation means see Trouble with renaming folders and sub folders using Batch