Skip to main content

More Powershell DSC resources released


The PowerShell Blog has released information about the second wave of resources to use in your Desired State Configuration. Looks like the guys have been really busy  and released some neat resources for us.

Here is the list:

Resource Description Module Name Link
xADDomain Create and manage an Active Directory Domain xActiveDirectory click here
xADDomainController Create and manage an AD Domain Controller xActiveDirectory click here
xADUser Create and manage an AD User xActiveDirectory click here
xWaitForADDomain Pause configuration implementation until the AD Domain is available.  Used for cross machine synchronization. xActiveDirectory click here
xSqlServerInstall Create and manage a SQL Server Installation. xSqlps click here
xSqlHAService Create and manage a SQL High Availability Service. xSqlps click here
xSqlHAEndpoint Create and manage the endpoint used to
access a SQL High Availability Group.
xSqlps click here
xSqlHAGroup Create and manage a SQL High Availability Group. xSqlps click here
xWaitForSqlHAGroup Pause configuration implementation until a
SQL HA Group is available.  Used for cross machine synchronization.
xSqlps click here
xCluster Create and manage a cluster. xFailOverCluster click here
xWaitForCluster Pause configuration until a cluster is available.  Used for cross machine synchronization. xFailOverCluster click here
xSmbShare Create and manage a SMB Share. xSmbShare click here
xFirewall Create and manage Firewall rules xNetworking click here
xVhdFile Manage files to be copied into a Vhd. xHyper-V click here
xWebsite Added functionality to xWebsite to support configuration of https websites. xWebAdministration click here
xVhd Bug fixes xHyper-V click here

This is starting to look really promising. With the second wave of resources, DSC is beginning to look like an enterprise “product” that the IT-pros could embrace with vengeance. First off they have now included an resource to not only manipulate the objects in Active Directory, however also the infrastructure with the xADDomain and xADDomainController resources. As I have previousely commented in my blog, this was one of the missing elements of DSC. I even looked into creating an custom resource for manipulating AD-objects myself using the custom resource in DSC.

Secondly with the release of the SQL resources, we can now handle deployment of a full 3-tier application all in Powershell DSC. If your company is building software and you have not yet started looking in to DSC, now is the time to start. May I ask why you have not started? Normally software runs through 3-4 stages:
  1. Birth (created in an development environment)
  2. Test/Staging environment
  3. QA-environment
  4. Production environment
Agile development suggests that the software moves through this cycle several times during a year, maybe several times each month. What is the tasks required between these stages? Somthing like this perhaps:
  1. Create the required virtual machines to be used (normally perhaps a web-server and a database-server), DSC xHyper-V resource
  2. Install the required roles/features, built-in DSC resource
  3. Install other required software, built-in DSC resource
  4. Configure web-server/sql server DSC xSQLps and xWebAdministration
  5. Congfigure users, DSC xADUser
  6. Install your custom software, built-in DSC resource
By investing into DSC your software would enjoy an identical environment between the different stages of it’s live and thus reducing the time and cost of release. Even if you do not create the entire stage in DSC, your ROI (Return On Investment) would be very nice. Tell that to your boss and get starting with DSC and PowerShell.

Now if you are not into software development, you probably have some other scenario where you could use DSC. If you are doing manually repetitive tasks that DSC could do for you, my advice to you would be that you are doing it the wrong way. Automation has been around for ages, however with DSC and PowerShell this is looking to be easier than ever.

Enjoy the new resources, I will :-)


Popular posts from this blog

Toying with audio in powershell

Controlling mute/unmute and the volume on you computer with powershell.

Add-Type -TypeDefinition @' using System.Runtime.InteropServices; [Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] interface IAudioEndpointVolume { // f(), g(), ... are unused COM method slots. Define these if you care int f(); int g(); int h(); int i(); int SetMasterVolumeLevelScalar(float fLevel, System.Guid pguidEventContext); int j(); int GetMasterVolumeLevelScalar(out float pfLevel); int k(); int l(); int m(); int n(); int SetMute([MarshalAs(UnmanagedType.Bool)] bool bMute, System.Guid pguidEventContext); int GetMute(out bool pbMute); } [Guid("D666063F-1587-4E43-81F1-B948E807363F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] interface IMMDevice { int Activate(ref System.Guid id, int clsCtx, int activationParams, out IAudioEndpointVolume aev); } [Guid("A95664D2-9614-4F35-A746-DE8DB63617E6"), Interfa…

Serialize data with PowerShell

Currently I am working on a big new module. In this module, I need to persist data to disk and reprocess them at some point even if the module/PowerShell session was closed. I needed to serialize objects and save them to disk. It needed to be very efficient to be able to support a high volume of objects. Hence I decided to turn this serializer into a module called HashData.

Other Serializing methods

In PowerShell we have several possibilities to serialize objects. There are two cmdlets you can use which are built in:
Both are excellent options if you do not care about the size of the file. In my case I needed something lean and mean in terms of the size on disk for the serialized object. Lets do some tests to compare the different types:


You might be curious why I do not use the Export-CliXML cmdlet and just use the [System.Management.Automation.PSSerializer]::Serialize static method. The static method will generate the same xml, however we …

Build your local powershell module repository - ProGet

So Windows Powershell Blog released a blog a couple of days ago (link). Not too long after, a discussion emerged about it being to complicated to setup. Even though the required software is open source (nugetgalleryserver), it looks like you need to have Visual Studio Installed to compile it. I looked into doing it without visual stuidio, however I have been unable to come up with a solution. I even tweeted about it since I am not an developer. Maybe someone how is familiar with “msbuild” could do a post on how to do it without VS.

Anyhow one of my twitter-friends (@sstranger) came to the rescue and pointed me in the direction of ProGet, hence the title of this post. ProGet comes in 2 different licensing modes
Free (reduced functionality)Enterprise (paid version with extra features)The good news is that the free version supports hosting a local PowershellGet repository which was my intention anyway. So off we go and create a Configration that can install ProGet for us. This is the conf…