I have several powershell windows open where I need to run the same commands in all those windows . A way that I considered to do that was
Get-Process -Name 'Powershell'
and get the ID and parse the powershell commands to those PIDs
But I don't know how can this be done or even if there is any easier way to do this.