Skip to content

CertificateProvider auto-imports PKI module many times #11241

@doctordns

Description

@doctordns

Attempting to use the PKI Module in Win10 using Preview 6.

I kind of expect a warning when the module is first loaded, with either import-module or via module autoload. But not on every operation:

See this graphic:
2019-12-03_14-25-53

In this session, I Set-Location (getting a warning), then did a get-ChildItem (and got a second warning message) then I did another Get-ChildItem (and got a THIRD warning. All the commands sent to the provider seem to generate a warning and I'd argue this is not a good user experience.

Steps to reproduce

# 1. Open a PowerShell console window then type:
CD Cert:\
LS
LS .\Currentuser

Expected behaviour

I would not expect the second two (and all subsequent) uses of cmdlets in a compatibility-imported module. I can live with the first warning, but the rest are a poor user experience.

Actual behaviour

See the graphic above

Environment data

PS Cert:\> $PSVersionTable

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions