Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b16728d
Fixing issue with faulty links from issue (2322)
bobbytreed Apr 25, 2018
c6ea429
Trying smaller pull requests to test Script Automation
bobbytreed Apr 25, 2018
e7d088d
Testing script automation with a smaller batch of files (#2359)
bobbytreed Apr 25, 2018
8080e1c
Bringing even with staging.
v-alje Apr 25, 2018
d48ac48
Merge branch 'release-bobbytreed' of github.com:PowerShell/PowerShell…
bobbytreed Apr 26, 2018
47dae5b
Bringing even with staging.
v-alje Apr 26, 2018
4cddb37
Bringing even with staging.
v-alje Apr 27, 2018
6021994
Merge branch 'release-bobbytreed' of github.com:PowerShell/PowerShell…
bobbytreed Apr 27, 2018
fd084c8
Merge pull request #2369 from bobbytreed/release-bobbytreed
Apr 27, 2018
745108f
Git Batch testing 15 files (#2371)
bobbytreed Apr 27, 2018
5ab8971
Batch automation: Formatting fixes (#2372)
bobbytreed Apr 27, 2018
09d07f9
Bringing even with staging.
v-alje Apr 27, 2018
b450b4d
Batch automation: Formatting fixes (#2377)
bobbytreed Apr 30, 2018
6cb4714
Merge branch 'staging' into release-bobbytreed
Apr 30, 2018
8800e06
Bringing even with staging.
v-alje Apr 30, 2018
d531bba
Bringing even with staging.
v-alje May 1, 2018
0974fc7
Merge pull request #2390 from PowerShell/staging
May 2, 2018
9e1270a
Bringing even with staging.
v-alje May 2, 2018
c98acc3
Bringing even with staging.
v-alje May 3, 2018
6db5c85
Bringing even with staging.
v-alje May 4, 2018
a55c8a0
Bringing even with staging.
v-alje May 4, 2018
6b2b148
Bringing even with staging.
v-alje May 4, 2018
5fac166
Bringing even with staging.
v-alje May 8, 2018
d8eb449
Bringing even with staging.
v-alje May 8, 2018
229645a
Bringing even with staging.
v-alje May 9, 2018
9422d10
Bringing even with staging.
v-alje May 9, 2018
501439b
Bringing even with staging.
v-alje May 10, 2018
526f8b7
Batch automation: Formatting fixes
bobbytreed May 10, 2018
c509d92
fixing two bullet spacings
bobbytreed May 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 49 additions & 15 deletions reference/3.0/Microsoft.PowerShell.Security/Get-Acl.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
ms.date: 06/09/2017
schema: 2.0.0
locale: en-us
Expand All @@ -7,47 +7,57 @@ online version: http://go.microsoft.com/fwlink/?LinkID=113305
external help file: Microsoft.PowerShell.Security.dll-Help.xml
title: Get-Acl
---

# Get-Acl

## SYNOPSIS

Gets the security descriptor for a resource, such as a file or registry key.

## SYNTAX

### ByPath (Default)

```
Get-Acl [[-Path] <String[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter <String>] [-Include <String[]>]
[-Exclude <String[]>] [-UseTransaction] [<CommonParameters>]
```

### ByInputObject

```
Get-Acl -InputObject <PSObject> [-Audit] [-AllCentralAccessPolicies] [-Filter <String>] [-Include <String[]>]
[-Exclude <String[]>] [-UseTransaction] [<CommonParameters>]
```

### ByLiteralPath

```
Get-Acl [-LiteralPath <String[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter <String>] [-Include <String[]>]
[-Exclude <String[]>] [-UseTransaction] [<CommonParameters>]
```

## DESCRIPTION

The **Get-Acl** cmdlet gets objects that represent the security descriptor of a file or resource.
The security descriptor contains the access control lists (ACLs) of the resource.
The ACL specifies the permissions that users and user groups have to access the resource.

Beginning in Windows PowerShell 3.0, you can use the **InputObject** parameter of **Get-Acl** to get the security descriptor of objects that do not have a path.

## EXAMPLES

### Example 1
```
PS C:\> Get-Acl C:\Windows

```powershell
Get-Acl C:\Windows
```

This command gets the security descriptor of the C:Windows directory.

### Example 2
```
PS C:\> Get-Acl C:\Windows\k*.log | Format-List -Property PSPath, Sddl

```powershell
Get-Acl C:\Windows\k*.log | Format-List -Property PSPath, Sddl
```

This command gets the Windows PowerShell path and SDDL for all of the .log files in the C:\Windows directory whose names begin with "k."
Expand All @@ -60,32 +70,40 @@ Lists are often used in Windows PowerShell, because long values appear truncated

The **SDDL** values are valuable to system administrators, because they are simple text strings that contain all of the information in the security descriptor.
As such, they are easy to pass and store, and they can be parsed when needed.

### Example 3
```
PS C:\> Get-Acl C:/Windows/k*.log -Audit | Foreach-Object { $_.Audit.Count }

```powershell
Get-Acl C:/Windows/k*.log -Audit | ForEach-Object { $_.Audit.Count }
```

This command gets the security descriptors of the .log files in the C:\Windows directory whose names begin with "k." It uses the **Audit** parameter to get the audit records from the SACL in the security descriptor.
Then it uses theForEach-Object cmdlet to count the number of audit records associated with each file.
The result is a list of numbers representing the number of audit records for each log file.

### Example 4
```
PS C:\> Get-Acl -Path HKLM:\System\CurrentControlSet\Control | Format-List

```powershell
Get-Acl -Path HKLM:\System\CurrentControlSet\Control | Format-List
```

This command uses the **Get-Acl** cmdlet to get the security descriptor of the Control subkey (HKLM\SYSTEM\CurrentControlSet\Control) of the registry.

The **Path** parameter specifies the Control subkey.
The pipeline operator (|) passes the security descriptor that **Get-Ac**l gets to the Format-List command, which formats the properties of the security descriptor as a list so that they are easy to read.

### Example 5
```
PS C:\> Get-Acl -InputObject (Get-StorageSubsystem -Name S087)

```powershell
Get-Acl -InputObject (Get-StorageSubSystem -Name S087)
```

This command uses the **InputObject** parameter of **Get-Acl** to get the security descriptor of a storage subsystem object.

## PARAMETERS

### -Audit

Gets the audit data for the security descriptor from the system access control list (SACL).

```yaml
Expand All @@ -101,6 +119,7 @@ Accept wildcard characters: False
```

### -Exclude

Omits the specified items.
The value of this parameter qualifies the Path parameter.
Enter a path element or pattern, such as "*.txt".
Expand All @@ -119,6 +138,7 @@ Accept wildcard characters: True
```

### -Filter

Specifies a filter in the provider's format or language.
The value of this parameter qualifies the **Path** parameter.
The syntax of the filter, including the use of wildcards, depends on the provider.
Expand All @@ -137,6 +157,7 @@ Accept wildcard characters: True
```

### -Include

Gets only the specified items.
The value of this parameter qualifies the **Path** parameter.
Enter a path element or pattern, such as "*.txt".
Expand All @@ -155,6 +176,7 @@ Accept wildcard characters: True
```

### -Path

Specifies the path to a resource.
**Get-Acl** gets the security descriptor of the resource indicated by the path.
Wildcards are permitted.
Expand All @@ -175,10 +197,11 @@ Accept wildcard characters: True
```

### -AllCentralAccessPolicies

Gets information about all central access policies that are enabled on the computer.

Beginning in Windows Server® 2012, administrators can use Active Directory and Group Policy to set central access policies for users and groups.
For more information, see [Dynamic Access Control: Scenario Overview](http://go.microsoft.com/fwlink/?LinkId=238408).
For more information, see [Dynamic Access Control: Scenario Overview](/windows-server/identity/solution-guides/dynamic-access-control--scenario-overview).

This parameter is introduced in Windows PowerShell 3.0.

Expand All @@ -195,6 +218,7 @@ Accept wildcard characters: False
```

### -InputObject

Gets the security descriptor for the specified object.
Enter a variable that contains the object or a command that gets the object.

Expand All @@ -216,6 +240,7 @@ Accept wildcard characters: False
```

### -LiteralPath

Specifies the path to a resource.
Unlike **Path**, the value of the **LiteralPath** parameter is used exactly as it is typed.
No characters are interpreted as wildcards.
Expand All @@ -237,6 +262,7 @@ Accept wildcard characters: False
```

### -UseTransaction

Includes the command in the active transaction.
This parameter is valid only when a transaction is in progress.
For more information, see about_Transactions.
Expand All @@ -254,18 +280,25 @@ Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

You can pipe a string that contains a path to Get-Acl.

## OUTPUTS

### System.Security.AccessControl

**Get-Acl** returns an object that represents the ACLs that it gets.
The object type depends upon the ACL type.

## NOTES
* By default, **Get-Acl** displays the Windows PowerShell path to the resource (\<provider\>::\<resource-path\>), the owner of the resource, and "Access", a list (array) of the access control entries in the discretionary access control list (DACL) for the resource. The DACL list is controlled by the resource owner.

- By default, **Get-Acl** displays the Windows PowerShell path to the resource (\<provider\>::\<resource-path\>), the owner of the resource, and "Access", a list (array) of the access control entries in the discretionary access control list (DACL) for the resource. The DACL list is controlled by the resource owner.

When you format the result as a list, ("`Get-Acl | Format-List`"), in addition to the path, owner, and access list, Windows PowerShell displays the following properties and property values:

Expand All @@ -278,8 +311,9 @@ The SACL specifies the types of access attempts for which Windows generates audi
Windows PowerShell uses the GetSddlForm method of security descriptors to get this data.

Because **Get-Acl** is supported by the file system and registry providers, you can use **Get-Acl** to view the ACL of file system objects, such as files and directories, and registry objects, such as registry keys and entries.



*
## RELATED LINKS

[Set-Acl](Set-Acl.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
ms.date: 06/09/2017
schema: 2.0.0
locale: en-us
Expand All @@ -7,44 +7,55 @@ online version: http://go.microsoft.com/fwlink/?LinkID=113307
external help file: Microsoft.PowerShell.Security.dll-Help.xml
title: Get-AuthenticodeSignature
---

# Get-AuthenticodeSignature

## SYNOPSIS

Gets information about the Authenticode signature in a file.

## SYNTAX

### ByPath (Default)

```
Get-AuthenticodeSignature [-FilePath] <String[]> [<CommonParameters>]
```

### ByLiteralPath

```
Get-AuthenticodeSignature -LiteralPath <String[]> [<CommonParameters>]
```

## DESCRIPTION

The Get-AuthenticodeSignature cmdlet gets information about the Authenticode signature in a file.
If the file is not signed, the information is retrieved, but the fields are blank.

## EXAMPLES

### Example 1
```
PS C:\> get-AuthenticodeSignature -filepath C:\Test\NewScript.ps1

```powershell
Get-AuthenticodeSignature -FilePath C:\Test\NewScript.ps1
```

This command gets information about the Authenticode signature in the NewScript.ps1 file.
It uses the FilePath parameter to specify the file.

### Example 2
```
PS C:\> get-authenticodesignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1

```powershell
Get-AuthenticodeSignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1
```

This command gets information about the Authenticode signature in the four files listed at the command line.
In this command, the name of the FilePath parameter, which is optional, is omitted.

### Example 3
```
PS C:\> get-childitem $pshome\*.* | foreach-object {Get-AuthenticodeSignature $_} | where {$_.status -eq "Valid"}

```powershell
Get-ChildItem $pshome\*.* | ForEach-Object {Get-AuthenticodeSignature $_} | where {$_.status -eq "Valid"}
```

This command lists all of the files in the $pshome directory that have a valid Authenticode signature.
Expand All @@ -56,9 +67,11 @@ It uses a pattern of *.* to exclude directories (although it also excludes files
The command uses a pipeline operator (|) to send the files in $pshome to the Foreach-Object cmdlet, where Get-AuthenticodeSignature is called for each file.

The results of the Get-AuthenticodeSignature command are sent to a Where-Object command that selects only the signature objects with a status of "Valid".

## PARAMETERS

### -FilePath

Specifies the path to the file being examined.
Wildcards are permitted, but they must lead to a single file.
The parameter name ("FilePath") is optional.
Expand All @@ -76,6 +89,7 @@ Accept wildcard characters: True
```

### -LiteralPath

Specifies the path to the file being examined.
Unlike **FilePath**, the value of the **LiteralPath** parameter is used exactly as it is typed.
No characters are interpreted as wildcards.
Expand All @@ -95,19 +109,25 @@ Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

You can pipe a string that contains a file path to Get-AuthenticodeSignature.

## OUTPUTS

### System.Management.Automation.Signature

Get-AuthenticodeSignature returns a signature object for each signature that it gets.

## NOTES
* For information about Authenticode signatures in Windows PowerShell, see about_Signing.

*
- For information about Authenticode signatures in Windows PowerShell, see about_Signing.

## RELATED LINKS

[Get-ExecutionPolicy](Get-ExecutionPolicy.md)
Expand Down
Loading