It will automatically try and find ‘test.ps1’ in various folder, the files folder adjacent to the playbook is one of them, copy it across, execute, then delete the file all in 1 go. If you truly don’t want to copy across the file then your only option is to read the script using the lookup plugin and use it with win_shell
`
name: run script in memory
win_shell: ‘{{ lookup(“file”, “test.ps1”) }}’
`
If this is a really large script you might read some command line length limits so it’s not always possible to do this.