windows-builder_skill

This skill guides building Windows images with Packer using WinRM and PowerShell to streamline AMIs, Azure images, and VMware templates.
  • Shell

196

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill hashicorp/agent-skills --skill windows-builder

  • SKILL.md4.5 KB

Overview

This skill builds Windows images with Packer using the WinRM communicator and PowerShell provisioners. It provides patterns and examples for AWS, Azure, and generic platforms, including WinRM setup, software installation, Windows Update handling, reboots, and cleanup. Use it to produce AMIs, Azure managed images, or VMware templates with repeatable, automated provisioning.

How this skill works

The skill configures Packer sources to use the WinRM communicator and supplies user-data or provisioning scripts to enable and harden WinRM on the VM. It runs PowerShell provisioners to install Chocolatey, packages, Windows features, and PSWindowsUpdate for patching. Reboots are coordinated with windows-restart and long timeouts to accommodate Windows Update and installer durations.

When to use it

  • Creating Windows AMIs for AWS or Azure managed images
  • Building VMware or other hypervisor templates with automated provisioning
  • Automating software installation and Windows feature configuration in an image
  • When images require full Windows Update runs and reboots before capture
  • Environments that need repeatable, versioned Windows base images

Best practices

  • Enable and test WinRM early via a user-data script and open ports 5985/5986 in security groups or NSGs
  • Use winrm_use_ssl and winrm_insecure when using self-signed certs; increase winrm_timeout to at least 15m
  • Install Chocolatey to manage application installs consistently across builds
  • Run PSWindowsUpdate with long timeouts and include windows-restart to handle reboots reliably
  • Clean temp files and Windows Update caches before image capture to reduce image size and state

Example use cases

  • AWS: amazon-ebs source with WinRM user_data to enable remote provisioning and build an AMI
  • Azure: azure-arm source building a managed image with preinstalled enterprise apps and patches
  • CI pipeline: automated image builds that install monitoring agents, IIS, and baseline tools via Chocolatey
  • VMware template: create a standard VM template with updates and cleanup for vSphere deployments
  • Patch baseline creation: run PSWindowsUpdate, reboot, then capture a patched image for distribution

FAQ

Windows Update and cumulative installers can run for 45–120 minutes. Allow long provisioner timeouts and consider pre-patched base images to shorten builds.

What causes WinRM timeouts and failures?

Common causes are closed ports (5985/5986), incomplete user-data WinRM setup, or short winrm_timeout. Verify network rules, user-data execution, and increase winrm_timeout to 15m or more.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational