PowerShell Logo Small

Import-Certificate



This is the built-in help made by Microsoft for the command 'Import-Certificate', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Imports one or more certificates into a certificate store.

SYNTAX


Import-Certificate [-FilePath] <String> [-CertStoreLocation <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Import-Certificate cmdlet imports one or more certificates into a certificate store.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=287533
Get-ChildItem
Set-Location
Export-Certificate

REMARKS

<

Examples


EXAMPLE 1

PS C:\>$file = ( Get-ChildItem -Path C:\files\root.cer )



PS C:\>$file | Import-Certificate -CertStoreLocation cert:\CurrentUser\Root



This example imports the certificate from the file into the root store of the current user.




EXAMPLE 2

PS C:\>Set-Location -Path cert:\CurrentUser\My



PS C:\>Import-Certificate -Filepath "C:\files\intermediate.cert"



This example imports the certificate from the file into the current store.