Append hostname to all lines in a file on a windows remote server

Hi all,

I have a csv file as below

admin_server, id:1, /tmp
admin_group, id:3, /home
user_group, id:5, /root

The number of lines in the file might vary.

I need to append hostname to every lines in the file. i.e. I need to add a column 1 which will have the hostname.

1st server:

server1,admin_server, id:1, /tmp
server1,admin_group, id:3, /home
server1,user_group, id:5, /root

2nd server.

server2,admin_server, id:1, /tmp
server2,admin_group, id:3, /home
server2,user_group, id:5, /root

In linux, replace module was used and it worked fine. But in windows the replace module is not working.Kindly advise.