< Back
Show-Access
Post
NAME Show-Access
SYNOPSIS
Display the ACL information for given files or folders.
SYNTAX
Show-Access [-Path] <String> [-NoFormat] [<CommonParameters>]
DESCRIPTION
Wraps Get-ACL to select the access list while retaining the file path being inspected.
Useful for Group-Object inspecting access controls.
This function is intended for interactive use inspecting a network share, as such it breaks best practice of
avoiding the use of format-* commands.
PARAMETERS
-Path <String>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-NoFormat [<SwitchParameter>]
Do not automatically pipe output to Format-Table
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Should refactor the format switch into a custom native cmdlet format document.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Show-Access '.\\INFO.lnk'
Path IdentityReference IsInherited AccessControlType
FileSystemRights
---- ----------------- ----------- -----------------
----------------
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Office False Allow ReadAndExecute,
Synchronize
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Support True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk NT AUTHORITY\\SYSTEM True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk NT AUTHORITY\\NETWORK SERVICE True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk BUILTIN\\Administrator True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Domain Admin True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Share Administrator True Allow
FullControl
Internal use of Format-Table to ease reading at the console.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>'.\\.gitignore','.\\asset.psm1' | show-access -NoFormat
Path : N:\\Documents\\helper\\.gitignore
IdentityReference : ORG\\jbennett
IsInherited : True
AccessControlType : Allow
FileSystemRights : FullControl
Path : N:\\Documents\\helper\\.gitignore
IdentityReference : BUILTIN\\Administrator
IsInherited : True
AccessControlType : Allow
FileSystemRights : FullControl
Use the NoFormat switch to bypass internal use of Format-Table for piping objects to further functions.
RELATED LINKS
SYNOPSIS
Display the ACL information for given files or folders.
SYNTAX
Show-Access [-Path] <String> [-NoFormat] [<CommonParameters>]
DESCRIPTION
Wraps Get-ACL to select the access list while retaining the file path being inspected.
Useful for Group-Object inspecting access controls.
This function is intended for interactive use inspecting a network share, as such it breaks best practice of
avoiding the use of format-* commands.
PARAMETERS
-Path <String>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-NoFormat [<SwitchParameter>]
Do not automatically pipe output to Format-Table
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Should refactor the format switch into a custom native cmdlet format document.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Show-Access '.\\INFO.lnk'
Path IdentityReference IsInherited AccessControlType
FileSystemRights
---- ----------------- ----------- -----------------
----------------
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Office False Allow ReadAndExecute,
Synchronize
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Support True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk NT AUTHORITY\\SYSTEM True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk NT AUTHORITY\\NETWORK SERVICE True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk BUILTIN\\Administrator True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Domain Admin True Allow
FullControl
\\\\ORG\\Desktop\\Start Menu\\INFO.lnk ORG\\Share Administrator True Allow
FullControl
Internal use of Format-Table to ease reading at the console.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>'.\\.gitignore','.\\asset.psm1' | show-access -NoFormat
Path : N:\\Documents\\helper\\.gitignore
IdentityReference : ORG\\jbennett
IsInherited : True
AccessControlType : Allow
FileSystemRights : FullControl
Path : N:\\Documents\\helper\\.gitignore
IdentityReference : BUILTIN\\Administrator
IsInherited : True
AccessControlType : Allow
FileSystemRights : FullControl
Use the NoFormat switch to bypass internal use of Format-Table for piping objects to further functions.
RELATED LINKS