17 lines
559 B
PowerShell
17 lines
559 B
PowerShell
function Get-AllCertificatesFromSpecificStore {
|
|
<#
|
|
.SYNOPSIS
|
|
Thin veneer wrapper around Get-ChildItem on the cert store.
|
|
Useful for mocking/testing more than calling gci directly.
|
|
#>
|
|
[CmdletBinding()]
|
|
[OutputType([Object])]
|
|
param (
|
|
[Parameter(Mandatory = $true)]
|
|
[System.Security.Cryptography.X509Certificates.StoreLocation]$StoreLocation,
|
|
[Parameter(Mandatory = $true)]
|
|
[System.Security.Cryptography.X509Certificates.StoreName]$StoreName
|
|
)
|
|
|
|
return @(Get-ChildItem Cert:\$StoreLocation\$StoreName)
|
|
} |