From c9f3120c350c361b4fe49effd625a71ef698f044 Mon Sep 17 00:00:00 2001 From: Florian Hopfner Date: Sun, 31 Dec 2023 17:19:57 +0100 Subject: [PATCH] replace hardcoded certificate store location with variable --- d365fo.tools/functions/new-d365entraintegration.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d365fo.tools/functions/new-d365entraintegration.ps1 b/d365fo.tools/functions/new-d365entraintegration.ps1 index f70c41ab..4077958f 100644 --- a/d365fo.tools/functions/new-d365entraintegration.ps1 +++ b/d365fo.tools/functions/new-d365entraintegration.ps1 @@ -240,7 +240,7 @@ function New-D365EntraIntegration { Stop-PSFFunction -Message "Stopping because the certificate thumbprint could not be retrieved" return } - $certificateObject = Get-ChildItem Cert:\LocalMachine\My | Where-Object Thumbprint -eq $certificateThumbprint + $certificateObject = Get-ChildItem $certificateStoreLocation | Where-Object Thumbprint -eq $certificateThumbprint if (-not $certificateObject) { Write-PSFMessage -Level Host -Message "Unable to get the certificate object." Stop-PSFFunction -Message "Stopping because the certificate object could not be retrieved"