Back to Browse

Use Windows PowerShell with Ansible

16.7K views
Nov 1, 2021
11:46

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: https://www.youtube.com/watch?v=M18yDGAd9TU

Download

1 formats

Video Formats

360pmp413.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Use Windows PowerShell with Ansible | NatokHD