PowerShell DSC Resource Kit Wave 5 Arrives
The PowerShell DSC Resource Kit Wave 5 is now available for your use. This wave contains 10 new DSC resources, taking us up to 77 total resources between the Resource Kits and what is shipping in Windows 8.1/Server 2012 R2. In response to a number of requests, DSC Reskit Wave 5 also includes an end-to-end example, with a configuration for WordPress deployments.
In addition to the new resources and the example configurations, we have also made some updates to existing resources based on feedback we have received. As a result, we have updated several of the modules, all of which will show up using the link above.
If you’re looking into using PowerShell DSC, but are blocked by a lack of particular resource provider, let us know in the comments or the TechNet QA Section.
What’s in this Wave?
This wave has added the following
- xWordPress: This module contains two resources, xIISWordPressSite and xWordPressSite, as well as example configurations under Samples, which show end-to-end deployment of the common WordPress site.
- xPhp: This DSC Resource allows you to Setup PHP in IIS. This is used in the xWordPress examples.
- xMySql: This module includes 5 resources that allow you to Setup a MySQL Server, Database, User, and create a Grant for the user. This is used in the WordPress examples.
- xPsDesiredStateConfiguration now includes xWindowsOptionalFeature. This resource allows configuring Windows Optional Features for Windows client SKUs.
- xWebAdministration has added xIisModule, which enables registration of modules (such as FastCgiModules) with IIS.
- xWindowsUpdate: This module actually went live just after Wave 4, so it missed the announcement of the Reskit. It contains the xHotfix resource, which handles installation of a Windows update (or a hotfix) from a given path (file path or a URI).
As always, we must reiterate that these resources come without any guarantees. The “x” prefix stands for experimental – which means these resources are provided AS IS and are not supported through any Microsoft support program or service. We will
monitor the TechNet pages, take feedback, and may provide fixes moving forward. Also, don’t forget to check out the community versions of many resources on PowerShell.Org’s GitHub.
After installing the modules, you can discover all of the resources available by using the Get-DSCResource cmdlet. Here is a brief description of each resource (for more details on a resource, check out the TechNet pages).
This DSC Composite Configuration allows you to configure an IIS site to run WordPress and set the contents of the WordPress configuration file.
This DSC Resource allows you to configure a WordPress Site
This DSC Resource allows you to Setup PHP in IIS. This is used in the xWordPress examples.
DSC Resource allows you to configure a MySQL server
This DSC Resource allows you to configure a MySql Database.
This DSC Resource allows you to configure a MySql User.
This DSC Resource allows you to configure a MySql Grant (permissions).
This DSC Resource allows you to configure a MySql Server, with a database, and a user, and grant to that database for that user.
This resource allows configuring Windows Optional Features for Windows client SKUs
This enables registration of modules (such as FastCgiModules) with IIS
Handles installation of a Windows update (or a hotfix) from a given path (file path or a URI)
Minor updates & bug fixes have been made for these.
When making changes to these resources, we urge the following practice:
- Update the following names by replacing MSFT with your company/community name and replacing the “x” with “c” (short for “Community”) or another prefix of your choice:
- Module name (ex: xWebAdministration becomes cWebAdministration)
- Folder name (ex: MSFT_xWebsite becomes Contoso_cWebsite)
- Resource Name (ex: MSFT_xWebsite becomes Contoso_cWebsite)
- Resource Friendly Name (ex: xWebsite becomes cWebsite)
- MOF class name (ex: MSFT_xWebsite becomes Contoso_cWebsite)
- Filename for the <resource>.schema.mof (ex: MSFT_xWebsite.schema.mof becomes Contoso_cWebsite.schema.mof)
- Update module and metadata information in the module manifest
- Update any configuration that use these resources
We reserve resource and module names without prefixes (“x” or “c”) for future use (e.g. “MSFT_WebAdministration” or “Website”). If the next version of Windows Server ships with a “Website” resource, we don’t want to break any configurations that use any community modifications. Please keep a prefix such as “c” on all community modifications.
As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform.
- The xJEA (Just Enough Admin) module requires the use of the Windows Management Framework (WMF) 5.0 preview , which only works with Windows 8.1 or Windows Server 2012 R2.
- The xMySQL and xWordPress modules require Windows 8.1 or Windows Server 2012 R2 and an update to the Windows Management Framework, which is linked to from each of the blog topics.
The other components of the DSC Resource Kit requires at least Windows 8.1 or Windows Server 2012 R2 with update KB2883200 (aka the GA Update Rollup). You can check whether it is installed by running the following command:
For most modules, you can use them on supported downlevel versions of Windows by installing WMF 4.0. Refer to these previous blog posts for more information on WMF 4.0 and issues with partial installation. You can confirm the requirements for each module on the individual blog topics that provide the details for the module.