In this blog post, I will show you how to install PowerShell modules on managed Windows machines with Ansible.
Ansible for Windows
With Ansible Windows modules we can manage Windows Server and Windows 10 machines using the same look and feel of Ansible for Linux. make sure you visit the blog series about how to get started with Ansible for Windows.
Win_PSmodle
For PowerShell modules installation Ansible is using the win_psmodule, module which handles the installation and uninstallation of modules from a managed machines.
In the Paylbook below, I am going to install a PowerShell module called ActiveDirectoryDsc which is available in the PowerShell gallery.
- name: "Work With Active Directory Machines" hosts: windows tasks: - name: "Install PowerShell Module" win_psmodule: name: ActiveDirectoryDsc state: present
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.