Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-ntfsaccess results different

$
0
0

Good morning,

I'm trying to extract results from a get-ntfsaccess command and faced a small disturbing issue.

When I use the command to get the result on screen, it goes as this:

Get-ChildItem '\\Server_name\D$\Directory 1\Directory 2' -Depth 0 -Directory -Recurse | Get-NTFSAccess


    Path: \\Server_name\D$\Directory 1\Directory 2\Directory 3 (Inheritance enabled)


Account                             Access Rights  Applies to                Type           IsInherited   InheritedFrom
-------                             -------------  ----------                ----           -----------   -------------
<account info>..................... ReadAndExecute ThisFolderAndSubfolders   Deny           False<account info>..................... Modify, Syn... ThisFolderSubfoldersAn... Allow          False<account info>..................... FullControl    ThisFolderSubfoldersAn... Allow          True          UNC\.........<account info>..................... Modify, Syn... ThisFolderSubfoldersAn... Allow          True          UNC\.........

When I want to perform an extract of my command, it goes as this (the result with format-list is exactly the same as in my extracted file):

Get-ChildItem '\\Server_name\D$\Directory 1\Directory 2' -Depth 0 -Directory -Recurse | Get-NTFSAccess | format-list

Name               : Contenu
FullName           : \\Server_name\D$\Directory 1\Directory 2\Directory 3
InheritanceEnabled : True
InheritedFrom      :
AccessControlType  : Deny
AccessRights       : ReadAndExecute
Account            : <account info>
InheritanceFlags   : ContainerInherit
IsInherited        : False
PropagationFlags   : None
AccountType        : group

So the issues here concerns "Applies to" and "InheritanceFlag", I'm guessing those both are the same information but shown differently.

But what I'd like is to have in my extracted file the result shown in "Applies to" and not what I get for now "InheritanceFlags".

Is there any parameter that allows me to get that result or maybe a complete other way to get it?

Thank you

Nad


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>