Category Archives: PfxCertificate

Get-PfxCertificate

NAME
    Get-PfxCertificate

SYNOPSIS
    Gets information about .pfx Certificate files on the computer.

SYNTAX
    Get-PfxCertificate [-FilePath] <string[]> [<CommonParameters>]

DESCRIPTION
    The Get-PfxCertificate cmdlet gets an object representing each specified .pfx Certificate file. A .pfx file includes both the Certificate and a private key.

PARAMETERS
    -FilePath <string[]>
        The full path to the .pfx file of the secured 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-PfxCertificate.

OUTPUTS
    System.Security.Cryptography.X509Certificates
        Get-PfxCertificate returns an object for each Certificate that it gets.

NOTES

        When using the Invoke-Command cmdlet to run a Get-PfxCertificate command remotely, and the .pfx Certificate file is not password protected, the value of the Authentication parameter of Invoke-Command must be “CredSSP”.

    ————————– EXAMPLE 1 ————————–

    C:\PS>Get-PfxCertificate -FilePath C:\windows\system32\Test.pfx

    Password: ******
    Signer Certificate:     Matt Berg (Self Certificate)
    Time Certificate:
    Time Stamp:
    Path:                    C:\windows\system32\zap.pfx

    Description
    ———–
    This command gets information about the Test.pfx Certificate on the system.

    ————————– EXAMPLE 2 ————————–

    C:\PS>Invoke-Command -computername Server01 -scriptblock {Get-PfxCertificate -FilePath C:\Text\TestNoPassword.pfx} -authentication CredSSP

    Description
    ———–
    This command gets a .pfx Certificate file from the Server01 remote computer. It uses the Invoke-Command to run a Get-PfxCertificate command remotely.

    When the .pfx Certificate file is not password-protected, the value of the Authentication parameter of Invoke-Command must be “CredSSP”.

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