-
-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
function Install-PACertificate { | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(ValueFromPipeline)] | ||
[PSTypeName('PoshACME.PACertificate')]$PACertificate | ||
) | ||
|
||
Process { | ||
|
||
if (-not $IsWindows -and 'Desktop' -ne $PSEdition) { | ||
Write-Warning "Install-PACertificate currently only works on Windows OSes" | ||
return | ||
} | ||
|
||
Write-Verbose "Importing $($PACertificate.Subject) certificate to Windows certificate store." | ||
Import-PfxCertInternal $PACertificate.PfxFullChain -PfxPass $PACertificate.PfxPass | ||
} | ||
|
||
|
||
<# | ||
.SYNOPSIS | ||
Install a Posh-ACME certificate into the local computer's certificate store. | ||
.DESCRIPTION | ||
This can be used instead of the -Install parameter on New-PACertificate to import a certificate into the local computer's certificate store. | ||
.EXAMPLE | ||
Install-PACertificate | ||
Install the certificate associated with the currently selected order. | ||
.EXAMPLE | ||
Get-PACertificate example.com | Install-PACertificate | ||
Install the specified certificate. | ||
.LINK | ||
Project: https://github.com/rmbolger/Posh-ACME | ||
.LINK | ||
Get-PACertificate | ||
#> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters