Knowledge check
Answer the questions, then expand each answer to check yourself.
1. A resource appears in the output of dsc resource list --adapter Microsoft.Adapter/WindowsPowerShell but not in dsc resource list --adapter Microsoft.Adapter/PowerShell. What does that most likely mean?
- A. The resource is broken and needs to be reinstalled.
- B. The resource is script-based, and the PowerShell 7+ adapter supports only class-based resources.
- C. The PowerShell 7+ adapter isn't installed.
- D. The module needs to be signed before PowerShell 7 will load it.
Show answer
B. The Windows PowerShell 5.1 adapter maintains backwards compatibility with script-based resources, while the PowerShell 7+ adapter deliberately supports class-based resources only. A resource visible to the first but not the second is a Path C candidate.
Answer C is worth ruling out properly: if the PowerShell 7+ adapter were missing, the command would fail or return nothing at all rather than returning an incomplete list.
2. Your team has 180 compiled MOF files on a pull server. For about 40 of them, the original Configuration script no longer exists in source control. Which path applies to those 40?
- A. Path A — adapt in place
- B. Path B — import compiled MOFs
- C. Path C — rewrite as class-based
- D. They can't be migrated and must be rewritten from scratch
Show answer
B. The import extension translates MOF files into configuration documents, which is exactly the rescue case for MOFs whose source is gone. After conversion you're back on Path A: a document that references legacy resources through an adapter.
3. Which statement about ImplementationDetail is correct?
- A.
ScriptBasedmeans the resource is written as a PowerShell class. - B.
ClassBasedmeans the resource implementsGet-TargetResource,Set-TargetResource, andTest-TargetResource. - C.
ScriptBasedmeans the resource implements theGet/Set/Test-TargetResourcetrio alongside a schema MOF file. - D.
ImplementationDetaildescribes how often the LCM runs the resource.
Show answer
C. ScriptBased is the function trio plus a .schema.mof. ClassBased is a PowerShell class decorated with [DscResource()].
4. Get-DscResource lists a resource, but dsc resource list doesn't. What should you check first?
- A. Whether the resource has a valid digital signature
- B. Which module paths each host resolves — print
$env:PSModulePathin both - C. Whether the LCM is in
ApplyAndAutoCorrectmode - D. Whether the MOF file has been recompiled recently
Show answer
B. Get-DscResource in Windows PowerShell enumerates from $env:PSModulePath as 5.1 sees it, while dsc resource list uses the adapter's own discovery. Disagreement between the two is almost always a module path difference, not a broken resource.
5. Which of these is not a good reason to choose Path D (native rewrite) for a resource?
- A. The resource is invoked hundreds of times per hour by a scheduler, and PowerShell host startup dominates the runtime.
- B. The resource must run on Linux and macOS without deploying PowerShell 7 first.
- C. The resource needs
whatIfArgand fine-grained capability declarations. - D. The team would prefer to work in a compiled language.
Show answer
D. Language preference isn't a payoff. Path D costs weeks; it needs a justification that survives a budget conversation — startup cost, platform reach, capability surface, or distribution as a product.
6. True or false: adapting resources in place (Path A) is a temporary state that every estate must eventually leave.
Show answer
False — with a caveat. A class-based resource running on PowerShell 7 through Microsoft.Adapter/PowerShell is a fully supported, long-term-viable end state, and many organizations run hybrid estates for years.
The caveat applies to script-based resources specifically: they depend on Windows PowerShell 5.1, which is in maintenance mode, and there are rumblings the 5.1 adapter may eventually be dropped. That's a reason to schedule Path C deliberately, not a reason to treat all adaptation as temporary.
> EOF