I have been thinking a long time about forcing myself to learn Desired Stat Configuration (DSC), but I haven’t gotten around to it… Now is the time
Desired State Configuration is this super cool technology that appeared in Windows Server 2012 R2 and when Microsoft st6arted talking about it the typical example was the you hade this farm of Web Servers and you wanted to ensure that they were identically configured. The problem is that most of my customers do not have a farm of web servers… so what do I use it for. Well, Microsoft is releasing these new DSC resources on a regular basis for a lot of products which means that it is getting more and more interresting. The latest resource kit is called Wave 9 and it contains the following resources:
cFileShare
xActiveDirectory
xAdcsDeployment
xAzure
xAzurePack
xBitlocker
xChrome
xComputerManagement
xCredSSP
xDatabase
xDhcpServer
xDismFeature
xDnsServer
xDscDiagnostics
xDSCResourceDesigner
xExchange
xFailOverCluster
xFirefox
xHyper-V
xInternetExplorerHomePage
xJea
xMySql
xNetworking
xPendingReboot
xPhp
xPowerShellExecutionPolicy
xPSDesiredStateConfiguration
xRemoteDesktopAdmin
xRemoteDesktopSessionHost
xSafeHarbor
xSCDPM
xSCOM
xSCSMA
xSCSPF
xSCSR
xSCVMM
xSmbShare
xSqlPs
xSQLServer
xSystemSecurity
xTimeZone
xWebAdministration
xWindowsRestore
xWindowsUpdate
xWinEventLog
xWordPress
As you can see thare are A LOT of them… some that I think are really cool are for instance TimeZone, RemoteDesktopAdmin, BitLocker and more. Note that all DCS recources starting with an X are eXperimental. So lets get started…
Prerequsites
DSC is built in to Windows Server 2012 R2 but it needs a patch KB2883200. If this patch is not installed you will net be able to see the modules you have installed.
Installing DSC Resources
There are some default resources installed by default:
File
Archive
Environment
Group
Log
Package
Registry
Script
Service
User
WaitForAll
WaitForAny
WaitForSome
WindowsFeature
WindowsOptionalFeature
WindowsProcess
If you want to install other modules (for instance Wave 9) you just download them and extract them to the folder C:\Program Files\WindowsPowerShell\Modules
Verifying the install
To verify the install run the following command
Get-DSCReource
In the next part we will look at how you actually use DSC to create server configurations
/Johan
Links
http://blogs.msdn.com/b/powershell/archive/2014/12/17/another-holiday-present-from-the-powershell-team-dsc-reskit-wave-9.aspx
http://support.microsoft.com/kb/2883200