Gets information about the Authenticode signature in a file. (Get-AuthenticodeSignature)

   

# NAME
Get-AuthenticodeSignature

# SYNOPSIS
Gets information about the Authenticode signature in a file.

# SYNTAX
Get-AuthenticodeSignature [-FilePath] <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.

# PARAMETERS
-FilePath <string[]>
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.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

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

# EXAMPLE 1

C:\PS>get-AuthenticodeSignature -filepath C:\Test\NewScript.ps1

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

# EXAMPLE 2

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

# Description
-----------
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

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

# Description
-----------
This command lists all of the files in the $pshome directory that have a valid Authenticode signature. The $pshome automatic variable contains the path to the Windows PowerShell installation directory.

The command uses the Get-ChildItem cmdlet to get the files in the $pshome directory. It uses a pattern of *.* to exclude directories (although it also excludes files without a dot in the filename).

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

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113307
about_Signing
about_Execution_Policies
Set-AuthenticodeSignature
Get-ExecutionPolicy
Set-ExecutionPolicy

C:\Windows>powershell get-help Set-AuthenticodeSignature -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows 10, 8.1, 8, 7, Vista / Windows Server 2016, 2012, 2008
»»»» ColorConsole









... Windows-10




Windows 10 How To

... Windows 10 FAQ
... Windows 10 How To




PowerShell: Gets information about the Authenticode signature in a file.

HTTP: ... PS_Windows/en/Get-AuthenticodeSignature.htm
0.218
15268

How can i force move or copy of the data while dragging?

 /

I don't always have the same CPU frequency, why?

 /

Ist Bing nicht die bessere Suchmaschine im Internet?

 /

What is a TPM 2.0 chip!

 /

Windows 10/11 extend password age / password expiration date!

 /

In der Explorer-Ansicht verborgene und Systemdateien anzeigen / ausblenden!

 /

Find and Open the Internet Options in MS Windows OS!

 /

URL redirection modules for Windows Server 2019, 2016, ...!

 /

Was sind Hintergrundprogramme?

 /

The most signifying keyboard shortcuts in Internet Explorer, with an explanation?

 /

How can I block to open *.zip, *.rar *.cab directory in explorer view?

 /

Can I use the bin-to-iso tool in the business area, ergo commercial!

 /