Bird
0
0

You want to create a manifest that requires PowerShell 7.0 or higher and only works on Core edition. Which keys and values should you set?

hard📝 Application Q8 of 15
PowerShell - Modules and Script Organization
You want to create a manifest that requires PowerShell 7.0 or higher and only works on Core edition. Which keys and values should you set?
ARequiredModules = '7.0'; CompatiblePSEditions = @('Desktop')
BPowerShellVersion = '7.0'; CompatiblePSEditions = @('Core')
CPowerShellVersion = 7.0; CompatiblePSEditions = 'Core'
DPowerShellVersion = '7.0'; CompatiblePSEditions = @('Desktop', 'Core')
Step-by-Step Solution
Solution:
  1. Step 1: Set minimum PowerShell version correctly

    Use PowerShellVersion = '7.0' with quotes to specify minimum version.
  2. Step 2: Set edition compatibility

    Use CompatiblePSEditions = @('Core') to restrict to Core edition only.
  3. Final Answer:

    PowerShellVersion = '7.0'; CompatiblePSEditions = @('Core') -> Option B
  4. Quick Check:

    Version string + array for editions [OK]
Quick Trick: Use string for version and array for editions [OK]
Common Mistakes:
  • Using number instead of string for version
  • Setting CompatiblePSEditions to Desktop instead of Core
  • Confusing RequiredModules with PowerShellVersion

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes