Jump to section

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

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. 

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.

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.

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.

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.

Keep reading

Article

Learning Ansible basics

Ansible automates IT processes like provisioning and configuration management. Learn the basics of Ansible with this introduction to key concepts.

Article

What's an Ansible Playbook?

An Ansible Playbook is a blueprint of automation tasks, which are IT actions executed with limited manual effort across an inventory of IT solutions.

Article

Why choose Red Hat for automation?

Red Hat Ansible Automation Platform includes all the tools needed to share automation across teams and implement enterprise-wide automation.

More about automation

Products

A unified solution that combines the security, features, integrations, and flexibility needed to scale automation across domains, orchestrate essential workflows, and optimize IT operations for AI adoption. 

Engagements with our strategic advisers who take a big-picture view of your organization, analyze your challenges, and help you overcome them with comprehensive, cost-effective solutions.

Resources

E-BOOK

Red Hat Ansible Automation Platform: A beginner’s guide

Customer Success Stories

See how our customers have used Ansible Automation Platform to accelerate IT operations

Podcast

Code Comments Season 2: Hear how organizations have adapted to do more with IT automation 

Training

Learning hub

Explore learning materials and tools designed to help you use Ansible Automation Platform, organized by the tasks you need to accomplish. 

Interactive Labs

These interactive scenarios let you start learning how to use Ansible Automation Platform for a variety of use cases—in your own browser. 

Technical Overview

This series of on-demand videos introduces you to using Ansible Automation Platform for a variety of use cases across IT environments.

Automating RED HAT ENTERPRISE LINUX

This course will teach you how to automate Linux® system administration tasks with the latest version of Ansible Automation Platform.