Class-based resources in Windows PowerShell not found when called from PowerShell
Nobody has claimed this yet.
- 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
- Install class-based DSC resource into current users path
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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