Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is Desired State Configuration (DSC) in PowerShell?
DSC is a management platform in PowerShell that helps you define and maintain the configuration of your computers automatically, ensuring they stay in a desired state.
Click to reveal answer
beginner
What is a DSC Configuration script?
A DSC Configuration script is a special PowerShell script that defines the desired settings for a computer or environment using a declarative syntax.
Click to reveal answer
beginner
What does the 'Node' keyword do in a DSC Configuration?
The 'Node' keyword specifies which computer(s) the configuration applies to. It can be a single computer or multiple computers.
Click to reveal answer
beginner
What is a 'Resource' in DSC?
A Resource is a building block in DSC that defines how to configure a specific part of the system, like installing software or setting a service state.
Click to reveal answer
beginner
How do you apply a DSC configuration to a computer?
You compile the configuration script to create a .mof file, then use the Start-DscConfiguration cmdlet to apply it to the target computer.
Click to reveal answer
What is the main purpose of Desired State Configuration (DSC)?
ATo monitor network traffic
BTo write scripts that run only once
CTo create user accounts manually
DTo automatically keep computers in a defined configuration state
✗ Incorrect
DSC ensures computers stay in the desired configuration automatically.
Which PowerShell keyword defines the target computers in a DSC configuration?
AResource
BNode
CConfiguration
DApply
✗ Incorrect
The 'Node' keyword specifies the target computers for the configuration.
What file type is generated after compiling a DSC configuration script?
A.mof
B.txt
C.xml
D.ps1
✗ Incorrect
DSC compiles configuration scripts into .mof files for applying configurations.
Which cmdlet applies a DSC configuration to a computer?
ASet-ExecutionPolicy
BInvoke-Command
CStart-DscConfiguration
DNew-Item
✗ Incorrect
Start-DscConfiguration applies the compiled DSC configuration to the target.
In DSC, what is a Resource used for?
ATo define how to configure a system component
BTo store user data
CTo write logs
DTo schedule tasks
✗ Incorrect
Resources define how to configure specific parts of the system in DSC.
Explain the basic workflow of creating and applying a DSC configuration.
Think about the steps from writing to applying the configuration.
You got /4 concepts.
Describe what a DSC Resource is and give an example of its use.
Resources are like building blocks for configurations.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of Desired State Configuration (DSC) in PowerShell?
easy
A. To monitor network traffic continuously
B. To write scripts that run only once manually
C. To automatically keep your computer setup as you want it
D. To create user accounts interactively
Solution
Step 1: Understand DSC's role
DSC is designed to keep system configurations consistent automatically.
Step 2: Compare options
Only To automatically keep your computer setup as you want it describes automatic maintenance of computer setup, which is DSC's goal.
Final Answer:
To automatically keep your computer setup as you want it -> Option C
Quick Check:
DSC purpose = automatic setup maintenance [OK]
Hint: DSC means automatic setup enforcement [OK]
Common Mistakes:
Thinking DSC only runs scripts once
Confusing DSC with network monitoring
Assuming DSC manages user accounts interactively
2. Which of the following is the correct way to start a DSC configuration block in PowerShell?
easy
A. Start-DSCConfig MyConfig { }
B. Configuration MyConfig { }
C. Config MyConfig { }
D. New-DSCConfig -Name MyConfig { }
Solution
Step 1: Recall DSC syntax
The DSC configuration block always starts with the keyword 'Configuration' followed by the name.
Step 2: Check options
Only Configuration MyConfig { } uses the correct keyword 'Configuration' to define the block.
Final Answer:
Configuration MyConfig { } -> Option B
Quick Check:
DSC block starts with 'Configuration' [OK]
Hint: DSC configs start with 'Configuration' keyword [OK]
Common Mistakes:
Using 'Config' instead of 'Configuration'
Trying to use cmdlets to start config blocks
Confusing DSC syntax with other PowerShell commands
3. Given this DSC configuration snippet, what will be the output file name generated after running MyConfig?
B. The configuration block must end with 'End-Configuration' command
C. The DestinationPath must be a folder, not a file
D. The property 'Content' should be 'Contents' in the File resource
Solution
Step 1: Check File resource properties
The File resource requires the property 'Contents' (plural), not 'Content'.
Step 2: Validate other parts
Node 'localhost' is valid, DestinationPath can be a file path, and no 'End-Configuration' command exists.
Final Answer:
The property 'Content' should be 'Contents' in the File resource -> Option D
Quick Check:
File resource uses 'Contents' property [OK]
Hint: File resource property is 'Contents' plural [OK]
Common Mistakes:
Using 'Content' instead of 'Contents'
Thinking Node names must be IP addresses
Expecting a special end command for configuration
5. You want to ensure a folder C:\Logs always exists on a remote computer using DSC. Which configuration snippet correctly enforces this desired state?