opscode/chef — pull request #645 by adamedx (2013-02-19 15:14:56+00:00)
Title: Addition of Batch and Powershell resources for Windows

Batch and Powershell script interpreters added as core resources to Chef, similar to bash and other script interpreters that already exist as core resources.

In addition to the functionality supported by the related resources, these two both support an architecture attribute to allow the caller to choose the platform architecture (32-bit or 64-bit) using the symbols :i386 and :x86_64. Running a script as one architecture or the other changes the view of the file system, registry, and other resources presented by the OS, and also affects the code extension capabilities of the shell process since 32-bit and 64-bit code amy not be mixed in the same process.

The resources and associated providers are implemented as subclasses of the script resource, mirroring the way that other script resources like bash have been implemented. A common bsae class implements Windows-specific functionality for the resources and providers, and a helper class covers 32-bit vs. 64-bit logic.