Automating Microsoft Windows with Red Hat Ansible Automation Platform

Copy URL

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

Learn 10 ways you can automate Windows systems

 

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. 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. 

Learn more about managing Windows hosts with Ansible

PowerShell

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.

Windows updates

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.

Red Hat Resources

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 the automation controller to securely manage and run your Ansible Playbooks from a central web-based user interface.

Explore the training course

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.

Read the case study

Red Hat Ansible Automation Platform is a subscription product that includes all the tools needed to implement enterprise-wide automation. It helps organizations scale IT automation, manage complex deployments, and govern automation. And 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, Q1 2023.

Ansible Automation Platform’s clear syntax and task-based nature makes it possible to orchestrate server configuration, 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.

Learn more about Ansible Automation Platform

Hub

The official Red Hat blog

Get the latest information about our ecosystem of customers, partners, and communities.

All Red Hat product trials

Our no-cost product trials help you gain hands-on experience, prepare for a certification, or assess if a product is right for your organization.

Keep reading

What is virtual infrastructure management? And how can automation help?

Virtual infrastructure management is the coordination of software, IT resources, and other tools to manage virtual machines and related IT environments throughout their entire lifecycle.

How to automate migrations with Red Hat Ansible Automation Platform

Red Hat Ansible Automation Platform makes it possible to automate one of the most troublesome and time-consuming processes in your IT department: migration.

Which Red Hat Ansible Automation Platform deployment option is right for you?

How your deployment of Ansible® Automation Platform is installed, managed, and maintained depends on the level of flexibility or customization your organization needs.

Red Hat Ansible Automation Platform resources