Bird
0
0

Given this DSC configuration snippet, what will be the output file name generated after running MyConfig?

medium📝 Command Output Q13 of 15
PowerShell - Automation Patterns
Given this DSC configuration snippet, what will be the output file name generated after running MyConfig?
Configuration MyConfig {
  Node 'localhost' {
    File ExampleFile {
      DestinationPath = 'C:\temp\example.txt'
      Contents = 'Hello DSC'
    }
  }
}
MyConfig
Alocalhost.mof
BMyConfig.ps1
Cexample.txt
DMyConfig.mof
Step-by-Step Solution
Solution:
  1. Step 1: Understand DSC output files

    Running a DSC configuration generates a MOF file named after the Node, here 'localhost'.
  2. Step 2: Identify the MOF file name

    The MOF file will be 'localhost.mof' because the Node is 'localhost'.
  3. Final Answer:

    localhost.mof -> Option A
  4. Quick Check:

    DSC MOF file = NodeName.mof [OK]
Quick Trick: DSC MOF file named after Node, not config [OK]
Common Mistakes:
  • Assuming MOF file is named after config
  • Confusing MOF with script files
  • Expecting output as the destination file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes