1

I am looking to produce a batch script that turns on a number of Windows Features as the same routine is currently performed on multiple machines, an example of this would be... Turn on Default Document, Directory Browsing and Static Content from the 'Common HTTP files' section from Windows Features.

Is this possible?

MDMoore313
  • 5,581
  • 6
  • 36
  • 75
Simon
  • 11
  • 1
  • I don't think batch files would work, powershell may be possible. Would you like to update the question? – MDMoore313 Jun 04 '14 at 12:38
  • 1
    [***dism***](http://technet.microsoft.com/en-us/library/dd744582(v=ws.10).aspx) seems still to work on Windows 8 and 8.1 – the-wabbit Jun 04 '14 at 12:45

1 Answers1

2

The new PowerShell feature called Desired State Configuration may be best suited to what you are trying to accomplish.

DSC essentially uses configuration templates that can be applied to a target machine and refresh its configuration at any time. In some ways they are like GPOs and in other ways they are similar to scripted management with PowerShell/WMI.

This introductory blog post probably summarizes it best. To borrow a few lines before you click, the article states:

DSC is a PowerShell extension and ships with Windows Server 2012 R2 and Windows 8.1. A couple of examples what DSC enables you to do are:

• Install or remove server roles and features • Manage registry settings • Manage files and directories • Start, stop, and manage processes and services • Manage local groups and user accounts • Install and manage packages such as .msi and .exe • Manage environment variables • Run Windows PowerShell scripts • Fix a configuration that has drifted away from the desired state • Discover the actual configuration state on a given node

SamErde
  • 3,409
  • 3
  • 24
  • 44