Skip to content

Modules under C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules not found with PowerShell 7-preview.6 #11172

@scrthq

Description

@scrthq

After updating to PowerShell 7-preview.6, I'm no longer able to import the ActiveDirectory module without providing the full path due to C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules no longer being in $env:PSModulePath. I know there was an update to Import-Module with this version that would use implicit remoting to import the module via Windows PowerShell, but it does not appear to be working as expected.

Steps to reproduce

Import-Module ActiveDirectory

Expected behavior

Module imports successfully by name.

Actual behavior

>> Import-Module ActiveDirectory
Import-Module: The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any module directory.

Environment data


Name                           Value
----                           -----
PSVersion                      7.0.0-preview.6
PSEdition                      Core
GitCommitId                    7.0.0-preview.6
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

CC @SteveL-MSFT

Metadata

Metadata

Assignees

Labels

Area-SideBySiderelated to ability to run PS7 side-by-side with WinPS or different versions of PS7Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions