PowerShell / PowerShell/DSC

Class-based resources in Windows PowerShell not found when called from PowerShell

Open
#810 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Need-Review
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Summary

Install a class-based DSC resource module into the current user path ~\Documents\WindowsPowerShell\Modules\ are not found by Microsoft.Windows/WindowsPowerShell adapter when called from PowerShell 7, if called from Windows PowerShell the resources are returned as expected. All users path works as expected in both PowerShell and Windows PowerShell.

Steps to reproduce
  1. Install class-based DSC resource into current users path
  2. In PowerShell 7 execute dsc resource list --adapter Microsoft.Windows/WindowsPowerShell
Expected behavior
Current user PS module path DSC resources should be found.
Actual behavior
Current user PS module path DSC resources are not found.
Error details

Environment data
7.6-preview4
Version

3.1.0-preview.5

Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing dsc resource list --adapter Microsoft.Windows/WindowsPowerShell in PowerShell 7 with a class-based DSC resource installed under ~\Documents\WindowsPowerShell\Modules\, then compare the adapter's module-path handling with Windows PowerShell. Done means current-user class-based resources are listed in PowerShell 7 while all-users resources continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.