Skip to content

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

@ThomasNieto

Description

@ThomasNieto

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions