which I had encountered a pr0blem
You really should explain what you are trying to accomplish and what error you are getting. Also explain what limitations you have. That is, can you use Powershell instead of Javascript?
How are you trying to execute Javascript?
Javascript still works for me on Win11.
It's really hard to help you if you don't define the environment that you are working with and what you are trying to accomplish.