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

FileSystemAclExtensions::GetAccessControl does not work until using Get-Acl once #18896

Copy link
Copy link
@Northman-de

Description

@Northman-de
Issue body actions

Prerequisites

Steps to reproduce

I have a script to create a report on filesystem permissions. For performance reasons I use [System.IO.FileSystemAclExtensions]::GetAccessControl() instead of Get-Acl.
This is working fine in 7,1.3 but does not work in 7.3.1 or 7.4.0-preview.1

Steps to reproduce:

 [System.IO.FileSystemAclExtensions]::GetAccessControl( [System.IO.DirectoryInfo]::new( "c:\windows"))

It will provide the expected output after using Get-Acl once, regardless of the path (e.g. Get-Acl HKCU:).

Expected behavior

Path Owner                       Access
---- -----                       ------
     NT SERVICE\TrustedInstaller CREATOR OWNER Allow  268435456…

Actual behavior

Path Owner Access
---- ----- ------

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.1
PSEdition                      Core
GitCommitId                    7.3.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Issue_GetAccessControl

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.Resolution-AnsweredThe question is answered.The question is answered.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No 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.