diff --git a/test-playbooks/win_dns_ps.yml b/test-playbooks/win_dns_ps.yml new file mode 100644 index 0000000..a2316b1 --- /dev/null +++ b/test-playbooks/win_dns_ps.yml @@ -0,0 +1,10 @@ +--- +- name: win_powershell_exec + hosts: windows_all + tasks: + - name: check DNS + win_shell: | + Get-DnsClientServerAddress -InterfaceIndex (Get-NetAdapter|where Status -eq "Up").ifindex -ErrorAction SilentlyContinue + register: command_output + - name: command output + ansible.builtin.debug: \ No newline at end of file