PFX Tool is a command line tool that does stuff with and around PFX certificates. Built for .NET Core developers that want to deal with PFX files without depending on PowerShell or certoc. It is a .NET Core Global Tool that is built to run against the .NET Core 2.2 runtime. Tested on Windows and on Docker Containers based on Windows NanoServer and Alpine Linux. To install:

dotnet tool install pfxtool -g

The basic usage is as follows:

pfxtool <command> <options>

The following commands are currently supported:

For details, run pfxtool without any options to get usage instructions.


Import test.pfx (protected with password Test123) into the current user’s personal store.

pfxtool import --file test.pfx --password Test123 --scope user --store my

Export certificate and key with thumbprint ABCDEF from the machine’s root certificate store into a file test.pfx, protecting the private key with password Test123.

pfxtool export --file test.pfx --password Test123 --scope machine --store root