1

I have a Windows Server 2016 (Build 14393) that I'm running NPrinting on (possibly not relevant). I performed an update on Friday night, and I am seeing EventID=300 errors. Below is the full text of the warning.

Provider Health: Cannot find the certificate store 
because the specified X509 store 
location WindowsPowerShell is not valid.. 

Details: 
    ProviderName=Certificate
    ExceptionClass=ProviderInvocationException
    ErrorCategory=ObjectNotFound
    ErrorId=CertProviderItemNotFound
    ErrorMessage=Cannot find the certificate store because 
      the specified X509 store 
      location WindowsPowerShell is not valid.
    Severity=Warning
    SequenceNumber=109
    HostName=Default Host
    HostVersion=5.1.14393.3866
    HostId=49853eaf-740f-437f-b361-bb0b40af7e66
    HostApplication=C:\Windows\system32\wbem\wmiprvse.exe
    EngineVersion=5.1.14393.3866
    RunspaceId=19286b5f-7eb9-45bb-b26d-8fddbc61a25b
    PipelineId=132

I've noticed that the errors only flood in when my Powershell ISE (Powershell 5.1.14393.3866) is open. And boy, do they flood in.

Powershell failing issue

Does anyone know how to resolve this issue? Any help is greatly appreciated

Black Dynamite
  • 523
  • 2
  • 5
  • 16

1 Answers1

0

This Warning is coming from PowerShell telling you the Certificate provider failed to load.

PowerShell has a "provider" built into Windows that connects cert: to the certificate stores on your computer so you can manipulate certificates in PowerShell easily. Here's a detailed explanation with examples https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/about/about_certificate_provider?view=powershell-7

As far as I'm aware, there are only two valid Store Locations: CurrentUser and LocalMachine

You can see these with Get-ChildItem cert: | Format-List *

PSPath        : Microsoft.PowerShell.Security\Certificate::CurrentUser
PSParentPath  :
PSChildName   : CurrentUser
PSDrive       : Cert
PSProvider    : Microsoft.PowerShell.Security\Certificate
PSIsContainer : True
LocationName  : CurrentUser
Location      : CurrentUser
StoreNames    : {SmartCardRoot, Root, Trust, AuthRoot...}

PSPath        : Microsoft.PowerShell.Security\Certificate::LocalMachine
PSParentPath  :
PSChildName   : LocalMachine
PSDrive       : Cert
PSProvider    : Microsoft.PowerShell.Security\Certificate
PSIsContainer : True
LocationName  : LocalMachine
Location      : LocalMachine
StoreNames    : {TestSignRoot, ClientAuthIssuer, Remote Desktop, Root...}

Your error says PowerShell is trying to open the Location named WindowsPowerShell and can't find it because it's not valid. That makes sense, since there is no location with that name.

I would start by checking which Locations you see in the cert: drive. You mention the errors pop up when you start ISE, do you have any Add-Ons in ISE? A code-signing add-in with a bug could be trying to open the wrong location and cause this error.

Garrett
  • 1,638
  • 4
  • 15
  • 25