Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerShell fails when trying to read certificate store with "The specified network resource or device is no longer available"

I was trying to find a specific certificate on my machine, and I ran into an odd issue. I was seeing The specified network resource or device is no longer available errors when calling:

Get-ChildItem -Path "XXXXX" -Recurse 

Where "XXXX" was the thumbprint of the certificate I was looking for.

To try to narrow down the issue, I started by removing the thumbprint of my command (i.e. calling Get-ChildItem -Recurse), and found that the script failed when trying to read from the UserDS certificate store (see abbreviated screenshot of output, below):

<code>Get-ChildItem -Recurse</code> output

I then tried to cd into the UserDS certificate store to see if it would even let me, and to see if I could see anything in that location. Upon trying to call ls I received the same error (see below):

enter image description here

I can't figure out what's causing this issue or how to fix it. It's blocking me on the local installation of a client's solution, so any help or ideas are very much appreciated. Thanks!

like image 214
Zachary Kniebel Avatar asked Dec 01 '25 02:12

Zachary Kniebel


1 Answers

The UserDS store (or Active Directory User Object in the certmgr.msc) displays active directory stored certificates of the user (see here, here, here and here).

The error 0x80070037 (the specified network resource or device is no longer available) message occurs when a local device (like an usb stick is unavailable) or a network connection is interrupted while accessing a resource.

The store has a key in the windows registry (Computer\HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates\UserDS) and saves information on certificates which are read from active director.

I see two options:

  • The information in the registry is corrupt
  • you have issues accessing the active directory

If you want to handle the error when calling Get-ChildItem look at this SO post

like image 104
Daniel Fisher lennybacon Avatar answered Dec 02 '25 20:12

Daniel Fisher lennybacon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!