{"id":14980487,"url":"https://github.com/voxpupuli/puppet-windowsfeature","last_synced_at":"2025-12-11T21:47:12.033Z","repository":{"id":8991646,"uuid":"10740566","full_name":"voxpupuli/puppet-windowsfeature","owner":"voxpupuli","description":"Library that uses ServerAdministration api that comes with Windows Server 2008 and Windows Server 2012 to add / remove windows features","archived":false,"fork":false,"pushed_at":"2024-09-16T19:10:54.000Z","size":409,"stargazers_count":30,"open_issues_count":4,"forks_count":50,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-10-29T14:22:44.064Z","etag":null,"topics":["hacktoberfest","puppet","windows-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/puppet/windowsfeature","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2013-06-17T15:29:57.000Z","updated_at":"2024-09-16T17:19:10.000Z","dependencies_parsed_at":"2024-11-06T06:34:43.416Z","dependency_job_id":"0d12f884-e5db-4bbe-9d3f-160585e11562","html_url":"https://github.com/voxpupuli/puppet-windowsfeature","commit_stats":{"total_commits":239,"total_committers":33,"mean_commits":7.242424242424242,"dds":0.7154811715481171,"last_synced_commit":"ddcc876eead5c9685758013b61fd7e3fde021290"},"previous_names":["opentable/puppet-windowsfeature"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-windowsfeature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-windowsfeature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-windowsfeature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-windowsfeature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-windowsfeature/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208416,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","puppet","windows-puppet-module"],"created_at":"2024-09-24T14:01:50.865Z","updated_at":"2025-12-11T21:47:06.985Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# puppet-windowsfeature\n\n[![License](https://img.shields.io/github/license/voxpupuli/puppet-windowsfeature.svg)](https://github.com/voxpupuli/puppet-windowsfeature/blob/master/LICENSE)\n[![Build Status](https://travis-ci.org/voxpupuli/puppet-windowsfeature.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-windowsfeature)\n[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-windowsfeature/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-windowsfeature?branch=master)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n3. [Setup - The basics of getting started with windowsfeature](#setup)\n    * [What windowsfeature affects](#what-windowsfeature-affects)\n    * [Setup requirements](#setup-requirements)\n4. [Usage - Configuration options and additional functionality](#usage)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n5. [Limitations - OS compatibility, etc.](#limitations)\n6. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nThe windowsfeature module allows you to install/remove windows features.\n\n## Module Description\n\nThe windowsfeature module introduces a new `windowsfeature` type uses the ServerManager API that comes with Windows Server 2008 R2 onward to add/remove Windows features.\n\nFor a list of the windows features you can install, please visit this [technet article](http://technet.microsoft.com/en-us/library/cc732757.aspx)\n\n## Setup\n\n### What windowsfeature affects\n\n* Installs windows features (and optionally corresponding tools)\n\n### Setup Requirements\n\n* windowsfeature makes use of Powershell so you will need to have at least version 2.0 installed in order to use this module.\n\n## Usage\n\nTo install a single windows feature such as .NET 3.5:\n\n```puppet\nwindowsfeature { 'NET-Framework-Core':\n  ensure =\u003e present,\n}\n```\n\nTo install several windows features as part of a large application such IIS:\n\n```puppet\n$iis_features = ['Web-Server','Web-WebServer','Web-Asp-Net45','Web-ISAPI-Ext','Web-ISAPI-Filter','NET-Framework-45-ASPNET','WAS-NET-Environment','Web-Http-Redirect','Web-Filtering','Web-Mgmt-Console','Web-Mgmt-Tools']\n\nwindowsfeature { $iis_features:\n  ensure =\u003e present,\n}\n```\n\nTo install any associated management tools:\n\n```puppet\nwindowsfeature { 'Web-WebServer':\n  ensure                 =\u003e present,\n  installmanagementtools =\u003e true,\n}\n```\n\nTo install all subfeatures without having to list them all out:\n\n```puppet\nwindowsfeature { 'Web-WebServer':\n  ensure             =\u003e present,\n  installsubfeatures =\u003e true,\n}\n```\n\nTo install a feature and reboot if one is pending:\n\n```puppet\n\nwindowsfeature { 'RDS-RD-Server':\n  ensure  =\u003e present,\n}\n\nreboot {'after_RDS_RD_Server':\n  when  =\u003e pending,\n  subscribe =\u003e Windowsfeature['RDS-RD-Server'],\n}\n```\n\n**DEPRECATION NOTICE: The restart parameter has been deprecated in favor of the puppetlabs reboot module ( https://github.com/puppetlabs/puppetlabs-reboot ).  This parameter will be removed in the next release.**\n\n## Reference\n\n### Types\n\nParameters are optional unless otherwise noted.\n\n#### `windowsfeature`\n\n##### `ensure`\n\nSpecifies whether the feature should be present. Valid options: 'present', 'installed' and 'absent'.\n\nDefault: 'present'.\n\n##### `name`\n\n*Required.*\n\nThe name of the feature you want to manage.\n\n##### `installmanagementtools`\n\nSpecifies that all applicable management tools of the roles, role services, or features specified by the Name parameter should be installed. Note: Although management tools are installed by default when you are installing features by using the UI, management tools are not installed by default when you install features by using the Install-WindowsFeature cmdlet; this parameter must be added to install management tools.\n\n##### `installsubfeatures`\n\nSpecifies that all subordinate role services, and all subfeatures of parent roles, role services, or features specified by the Name parameter should be installed.\n\n##### `restart`\n\nSpecifies that the target system is restarted automatically, if a restart is required by the installation process for the specified roles or features.\n\n##### `source`\n\nSpecify the location of an installation source. The source must be from the exact same version of Windows for the reinstallation to work. Without this parameter, PowerShell will use Windows Update by default to look for an installation source\n\n## Upgrading from 1.0.1 Release\n\nPreviously, the windows features were managed by individual execs:\n\n```puppet\nexec { \"add-feature-${title}\":\n  command  =\u003e \"Import-Module ServerManager; ${command} ${features} ${_installmanagementtools} ${_installsubfeatures} ${_installsource} -Restart:$${_restart}\",\n  onlyif   =\u003e \"Import-Module ServerManager; if (@(Get-WindowsFeature ${features} | ?{\\$_.Installed -match \\'false\\'}).count -eq 0) { exit 1 }\",\n  provider =\u003e powershell,\n  timeout  =\u003e $timeout,\n}\n```\n\nThis lead to long execution times when managing a large amount of features, even after features were installed, as the Powershell would have to run the onlyif command for every check.\n\nThe new 2.0.0 release uses native types and providers, which speeds up the time as it can just compare the resources on the machine with the results from Get-WindowsFeature.\n\nFor example, enabling all the Windows features for a standard IIS setuo after features are installed (ie. an idempotent run):\n\n1.0.0 release:\n\n```\nwin-2012R2-std 01:29:30$ puppet apply --verbose --detailed-exitcodes C:\\Windows\\Temp\\apply_manifest.pp.8276\n  Info: Loading facts\n  Notice: Compiled catalog for win-2012r2-std.home in environment production in 0.44 seconds\n  Info: Applying configuration version '1464136176'\n  Notice: Finished catalog run in 15.30 seconds\n```\n\n```\nwin-2012R2-std 01:29:30$ puppet apply --verbose --detailed-exitcodes C:\\Windows\\Temp\\apply_manifest.pp.8276\n  Info: Loading facts\n  Notice: Compiled catalog for win-2012r2-std.home in environment production in 0.44 seconds\n  Info: Applying configuration version '1464136176'\n  Notice: Finished catalog run in 3.34 seconds\n```\n\nSo that's a third of the original runs time! And this would only increase with larger amounts of features, as the more features to check, the longer it would take.\n\nAnother benefit is this module now has less dependancies on other modules, as it's all native to the module now.\n\n## Limitations\n\nThis module is tested on the following platforms:\n\n* Windows 2008 R2\n* Windows 2012\n* Windows 2012 R2\n* Windows 2016\n\nIt is tested with the OSS version of Puppet only.\n\n### Known issues\n\n* Specifying installmanagementtools and/or installsubfeatures when a feature is already installed will not install said management tools or sub features.\n\n### Contributing\n\nPlease read CONTRIBUTING.md for full details on contributing to this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-windowsfeature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-windowsfeature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-windowsfeature/lists"}