# Is there a way to display all AD objects with a specific certificate ?

**URL:** <https://forums.powershell.org/t/is-there-a-way-to-display-all-ad-objects-with-a-specific-certificate/14342>\
**Category:** PowerShell Help\
**Created:** [May 7, 2020, 10:16am UTC](https://forums.powershell.org/t/is-there-a-way-to-display-all-ad-objects-with-a-specific-certificate/14342 "2020-05-07T10:16:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![synop6](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@synop6](https://forums.powershell.org/u/synop6)\
**Post date:** [May 7, 2020, 10:16am UTC](https://forums.powershell.org/t/is-there-a-way-to-display-all-ad-objects-with-a-specific-certificate/14342/1 "2020-05-07T10:16:30Z")

</div>

Hello,

Here is my issue : in my AD, it seems like a user account name (A) has the same certificates as another one (B). Because of that, I just can't assign B to his computer. We already made some LDAP sync / trying to remove and reupload the certificates but it's still not working. Is there a way in Powershell to get all AD objects with a specific certificate ? So I could be able to determine which account is problematic ?

I already tried to assign a new
```
System.Security.Cryptography.X509Certificates
```
object but I got the following error message :

| 
2
 | 
```
Cannot create type. Only core types are supported in this language mode.
```
 |

We’re working on W7 SP1 Enterprise 64 bits and using PS5.1 / .NET 4.7.1

Thanks by advance for you help

---

<div class="post-metadata">

**Author:** ![rob-simmers](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rob-simmers/32/1010_2.png) [@rob-simmers](https://forums.powershell.org/u/rob-simmers)\
**Post date:** [May 7, 2020, 11:18am UTC](https://forums.powershell.org/t/is-there-a-way-to-display-all-ad-objects-with-a-specific-certificate/14342/2 "2020-05-07T11:18:43Z")

</div>

Did you search? “powershell get-aduser certificates” looks promising…

> **[Active Directory Certificate Services (AD CS) PowerShell Examples - TechNet...](https://social.technet.microsoft.com/wiki/contents/articles/1673.active-directory-certificate-services-ad-cs-powershell-examples.aspx)**
>
> Technical articles, content and resources for IT Professionals working in Microsoft technologies

---

<div class="post-metadata">

**Author:** ![synop6](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@synop6](https://forums.powershell.org/u/synop6)\
**Post date:** [May 12, 2020, 2:07am UTC](https://forums.powershell.org/t/is-there-a-way-to-display-all-ad-objects-with-a-specific-certificate/14342/3 "2020-05-12T02:07:58Z")

</div>

Thanks for the link, don’t know how I missed that one… Anyway, that was helpful for us. Thank you !

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/is-there-a-way-to-display-all-ad-objects-with-a-specific-certificate/14342/4 "2024-05-16T20:29:43Z")

</div>

Closed on May 16, 2024, 8:29pm UTC


