Steps to reproduce
- Define PowerShell classes in a script module.
- Write a test script, Write-Hello.ps1, that returns "Hello World"
- At the command line, use the Using module statement to import the script module.
Expected behavior
The classes in the script module are imported into and available in the caller's session.
Actual behavior
The classes in the script module are NOT imported into and available in the caller's session.
If you comment out the ScriptsToProcess key, the classes are correctly imported into the session.
Environment data
PS C:\Program Files\PowerShell\6.0.0.14> $PSVersionTable
Name Value
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
SerializationVersion 1.1.0.1
PSEdition Core
BuildVersion 3.0.0.0
CLRVersion
PSRemotingProtocolVersion 2.3
GitCommitId v6.0.0-alpha.14
WSManStackVersion 3.0
PSVersion 6.0.0-alpha