Figured it out using this link
I created a PowerShell script to regenerate this certificate here
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to follow the steps listed here and getting stuck on step 3 while running ExportAuthCert.ps1:
$thumbprint = (Get-AuthConfig).CurrentCertificateThumbprint
if((test-path $env:SYSTEMDRIVE\OAuthConfig) -eq $false)
{
md $env:SYSTEMDRIVE\OAuthConfig
}
cd $env:SYSTEMDRIVE\OAuthConfig
$oAuthCert = (dir Cert:\LocalMachine\My) | where {$_.Thumbprint -match $thumbprint}
$certType = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
$certBytes = $oAuthCert.Export($certType)
$CertFile = "$env:SYSTEMDRIVE\OAuthConfig\OAuthCert.cer"
[System.IO.File]::WriteAllBytes($CertFile, $certBytes)
If I look at the value of $oAuthCert after line 7, it returns nothing. Line 8 doesn't throw an error, but line 9 does when it tries to export $oAuthCert to a file (since it is null).
You cannot call a method on a null-valued expression.
At C:\users\jdale\desktop\ExportAuthCert.ps1:9 char:1
- $certBytes = $oAuthCert.Export($certType)
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "WriteAllBytes" with "2" argument(s): "Value cannot be null.
Parameter name: bytes"
At C:\users\jdale\desktop\ExportAuthCert.ps1:11 char:1
- [System.IO.File]::WriteAllBytes($CertFile, $certBytes)
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : ArgumentNullException
When I look through the certificate store, I do not find any certificate matching the thumbprint that was returned on the first line. There must be some way to update that thumbprint, anyone know how?
Figured it out using this link
I created a PowerShell script to regenerate this certificate here