Skip to content

Should Get-Item Cert:\ return an object #6258

@KevinMarquette

Description

@KevinMarquette

Calling Get-Item on the root of a provider should return an item.

it does for these commands:

Get-Item C:\
Get-Item HKLM:\

But not for this command

Get-Item Cert:\

Behaviour is the same as it was in 5.1. I suspect it has always been this way.

I am only creating this issue because I corrected a test in #6256 for #6245 that was malformed. It then started to fail on the assumption that Get-Item would give it an object in that case. I adjusted the test to no longer check the Cert:\ path.

Steps to reproduce

Get-Item Cert:\
Get-Item C:\
Get-Item HKLM:\

Expected behavior


Name : CurrentUser

Name : LocalMachine

    Directory:


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d--hs-        2/25/2018   5:48 PM                C:\

    Hive:


Name                           Property
----                           --------
HKEY_LOCAL_MACHINE

Actual behavior

    Directory:


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d--hs-        2/25/2018   5:48 PM                C:\

    Hive:


Name                           Property
----                           --------
HKEY_LOCAL_MACHINE

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0
PSEdition                      Core
GitCommitId                    v6.0.0
OS                             Microsoft Windows 10.0.16299
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-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions