You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Start-C4bCcmSetup.ps1
+26-19Lines changed: 26 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,21 @@ param(
17
17
[System.Management.Automation.PSCredential]
18
18
$DatabaseCredential= (Get-Credential-Username ChocoUser -Message 'Create a credential for the ChocolateyManagement DB user (document this somewhere)'),
Write-Warning"You specified $CertificateThumbprint for use with CCM service, but the certificate is not in the required LocalMachine\TrustedPeople store!"
128
-
Write-Warning"Please place certificate with thumbprint: $CertificateThumbprint in the LocalMachine\TrustedPeople store and re-run this step"
129
-
throw"Certificate not in correct location....exiting."
130
-
}
131
-
else {
138
+
if (-not (Get-Item Cert:\LocalMachine\TrustedPeople\$Thumbprint-EA 0) -and-not (Get-Item Cert:\LocalMachine\My\$Thumbprint-EA 0)) {
139
+
Write-Warning"You specified $Thumbprint for use with CCM service, but the certificate is not in the required LocalMachine\TrustedPeople store!"
140
+
Write-Warning"Please place certificate with thumbprint: $Thumbprint in the LocalMachine\TrustedPeople store and re-run this step"
141
+
throw"Certificate not in correct location... exiting."
0 commit comments