Ansible is a very powerful configuration management platform that allows using many different automation tools for configuring your Windows hosts. One of those is Windows PowerShell. How can you use Windows PowerShell with Ansible?
Ansible natively provides modules that allow interacting with your Windows hosts using Powershell. Those are win_powershell, win_command, and win_shell. You can find more information about those here:
Win_powershell:
https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_powershell_module.html
win_command:
https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_command_module.html#ansible-collections-ansible-windows-win-command-module
win_shell:
https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_shell_module.html#ansible-collections-ansible-windows-win-shell-module
You can easily configure your Windows host for Ansible control node communication using the community driven script ConfigureRemotingForAnsible.ps1 script. Read more about that script here:
https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
Watch my previous video on how to manage Windows with Ansible, showing how to configure Kerberos authentication using Active Directory credentials here: