Select a language
Automating Microsoft Windows with Ansible
Ansible can be used to manage and execute core functions in Windows environments, from security updates to remote management using WinRM. Although Ansible must be run on Linux®, Windows administrators can use Ansible to manage and automate their systems without needing to know how to use a Linux terminal.
Ansible includes native Windows support that uses Windows PowerShell remoting to manage Windows in a way that will feel familiar to Windows administrators.
For enterprise automation, Red Hat® Ansible® Automation Platform contains modern tools for managing and automating Microsoft Windows environments. Red Hat Ansible Automation Platform can help you to automate provisioning, application deployment, and configuration management for a multivendor environment.
With Red Hat Ansible Automation Platform’s Windows support you can:
- Install and uninstall MSIs
- Enable and disable Windows features
- Start, stop, and manage Windows services
- Create and manage local users and groups
- Manage Windows packages via the Chocolatey package manager
- Manage and install Windows updates
- Fetch files from remote sites
- Push and execute PowerShell scripts
This checklist reviews 10 ways you can automate Windows systems using Red Hat Ansible Automation Platform.
When using Ansible to manage Windows, many of the syntax and rules that apply for Unix or Linux hosts also apply to Windows, but there are still some differences when it comes to components like path separators and OS-specific tasks.
WinRM needs to be configured so that Windows servers or clients can be accessed from the Ansible control machine.
The PowerShell script ConfigureRemotingForAnsible, will help you to get started with Ansible for Windows in your development or testing environment. The script configures WinRM on any supported Windows server or client target.
Use this tutorial for Windows admins to get started using Ansible.
Most of the Ansible modules are written for Linux machines and arbitrary web services. These modules are written in Python and most of them do not work on Windows.
Because of this, there are dedicated Windows modules that are written in PowerShell and are meant to be run on Windows hosts.
You can also write your own modules or use Ansible playbooks to automate your Windows systems and orchestrate tasks. Ansible playbooks are YAML-formatted files that contain a set of configurations and tasks that achieve an end state on an Ansible, Windows, or Linux target host.
Ways to automate Windows systems
PowerShell is the task-based command line shell and scripting language included with Windows.
Red Hat Ansible Automation Platform allows you to automate brand new Windows systems, including all .NET and DSC functions, without installing another scripting language.
Windows Remote Management (WinRM)
WinRM is Microsoft’s built-in HTTP-based remote management technology. WinRM’s non-interactive login makes it difficult to perform some tasks like double-hop authentication and Windows updates.
With Red Hat Ansible Automation Platform, you can codify authentication to automate these remote management tasks in Windows.
Application installation and management
Windows does not include an integrated package management system and uses Microsoft Store for application distribution and maintenance. However, Microsoft Store is not easy to automate.
Red Hat Ansible Automation Platform provides a module for automating basic package management in Windows. It also integrates with Chocolatey software management automation for Windows to provide automated idempotent package management.
Update management is an ongoing responsibility. Windows Update delivers software updates for Windows systems, and many IT teams use Microsoft System Center Configuration Manager (SCCM) to manage these updates across their systems.
However, SCCM can be unreliable for performing automated updates, particularly when reboots are involved, making it more difficult to meet maintenance windows.
Red Hat Ansible Automation Platform lets you perform basic synchronous updates using Windows Update, making automated updates more reliable. It can also manage required intermediate reboots automatically, allowing a single Ansible task to seamlessly install hundreds of updates.
Get trained in automation for Windows
Microsoft Windows Automation with Red Hat Ansible Automation Platform
This training course will teach you how to automate administration on Windows Server to enable your DevOps workflow using Red Hat Ansible Automation Platform.
You will use Ansible to write automation playbooks for Microsoft Windows systems to perform common system administration tasks reproducibly at scale. You will also learn to use Red Hat Ansible Tower to securely manage and run your Ansible playbooks from a central web-based user interface.
Case study: How Siemens automated its Windows environment
Siemens, a global technology company, deployed Red Hat Ansible Automation Platform to simplify and better automate its Windows-based public key infrastructure (PKI) environment.
By implementing Ansible Automation Platform, Siemens’ PKI team is now using Ansible on Windows to automate manual management tasks and improve communications security across the business.
Read the complete case study to learn more about Siemens’ success.
Why choose Red Hat for automation
Red Hat Ansible Automation Platform helps organizations scale IT automation, manage complex deployments, and govern automation. It allows users to centralize and control their IT infrastructure with a visual dashboard, role-based access control, playbooks, and analytics to reduce operational complexity.
Additionally, Red Hat Ansible Automation Platform was named a Leader by Forrester Research in the Forrester Wave™: Infrastructure Automation Platforms, Q3 2020.
Ansible Automation Platform’s clear syntax and task-based nature makes it possible to orchestrate server configuration and management, and application deployments tasks and ensure tasks happen when they need to and in the right order.
With the right automation solution in place, you can deploy new applications and services faster, manage IT infrastructure more efficiently, and see an increase in application development productivity.
A simple, agentless platform for building IT automation at scale. Centralize and control your IT infrastructure with a visual dashboard, role-based access control, and more.