Workshop
Create a DSC configuration file that performs the following two tasks:
- Ensures that the Shutdown Event Tracker is enabled
- Ensures that the Google Chrome web browser is installed
The only hint I’ll provide is that you need both the Registry built-in DSC resource and the xChrome custom resource to complete the configuration.
Quiz
You’d like to see what options are available for the WindowsFeature DSC resource. Which of the following commands accomplishes that goal?
- Get-Package
- Get-DscResource
- Get-Job
- Get-DscLocalConfigurationManager
The UpdateDscConfiguration cmdlet can be used only in DSC push scenarios.
- True
- False
A DSC authoring server running WMF 4.0 can push a configuration to a server running WMF 5.0.
- True
- False
Answers
The correct answer is B. Here is a run of the WindowsFeature DSC resource properties from my Windows Server 2012 R2 domain controller:
PS C:\> (Get-DscResource -Name WindowsFeature).Properties Name PropertyType IsMandatory Values ---- ------------ ----------- ------ Name [string] True {} Credential [PSCredential] False {} DependsOn [string[]] False {} Ensure [string] False {Absent, Present} IncludeAllSubFeature [bool] False {} LogPath [string] False {} Source [string] False {}
Remember that you can run Get-Command -module PSDesiredStateConfiguration to retrieve a list of all DSC commands.
- The correct answer is B. Update-DscConfiguration refreshes the target node only when a DSC pull server is online and available.
- The correct answer is A. Remember that backward compatibility is a priority for the Windows PowerShell team. To use DSC, all your nodes must have the DSC bits available, which means that your Powershell version is 4 or 5 and your host operating system is Windows Server 2012/R2 or Windows 8/8.1.