ps/Modules/Alkami.PowerShell.Configuration/Public/Get-AllCertificatesFromSpecificStore.ps1

17 lines
559 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
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)
}