--- - name: win_file module demo hosts: all vars: ansible_shell_type: powershell shell_type: powershell tasks: - name: Creating an empty file win_shell: 'New-Item C:\test.txt -ItemType File'