Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ScriptsToProcess not honored when Import-Module is passed -Version param #3738

Copy link
Copy link
@Matteo-T

Description

@Matteo-T
Issue body actions

Steps to reproduce

  • Install SqlServer module from PSGallery (I doubt the issue is specific to my module, though)
  • Open PowerShell (full .Net, I'm on Win10 using the PowerShell that comes with the OS)
    PowerShell -executionpolicy bypass
  • Import-Module SqlServer -Verbose
    (observe that SqlServer.ps1, listed in the SqlServer.psd1 manifest file, is loaded during import)
  • Close PowerShell
  • Restart PowerShell (same as above)
  • Import-Module SqlServer -Verbose -Version 21.0.17099

Expected behavior

The SqlServer.ps1 script is loaded

Actual behavior

The SqlServer.ps1 script is NOT loaded

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16192.0
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16192.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.