Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ms-luf/get-adusercertificate
simple powershell module to get single or all user/contact certificates from an AD with all related information including metadata
https://github.com/ms-luf/get-adusercertificate
active-directory certificates contact-certificates metadata powershell powershell-gallery powershell-module smime
Last synced: 12 days ago
JSON representation
simple powershell module to get single or all user/contact certificates from an AD with all related information including metadata
- Host: GitHub
- URL: https://github.com/ms-luf/get-adusercertificate
- Owner: MS-LUF
- Created: 2017-11-07T10:39:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-15T22:07:25.000Z (over 5 years ago)
- Last Synced: 2024-11-22T16:48:16.575Z (2 months ago)
- Topics: active-directory, certificates, contact-certificates, metadata, powershell, powershell-gallery, powershell-module, smime
- Language: PowerShell
- Size: 11.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![image](https://www.lucas-cueff.com/files/gallery.png)
# Get-ADUserCertificate
simple powershell module to get single or all user/contact certificates from an AD with all related information including metadata(c) 2018-2019 lucas-cueff.com Distributed under Artistic Licence 2.0 (https://opensource.org/licenses/artistic-license-2.0).
## install Get-ADUserCertificate from PowerShell Gallery repository
You can easily install it from powershell gallery repository
https://www.powershellgallery.com/packages/Get-ADUserCertificate/
using a simple powershell command and an internet access :-)
```
Install-Module -Name Get-ADUserCertificate
```## import module from PowerShell
```
.SYNOPSIS
simple module to get single or all user/contact certificate from an AD
look for a certificate in usercert, usercertificate, usersmimecertificate attributes for contact and user object
2 functions available : Get-ADUserCertificate and Get-AllADUserCertificates
the function are standalone and the code could be used outside the module easily. the only prerequisite is RSAT with AD cmdlets..DESCRIPTION
Require RSAT if used on non Domain Controller environment.
Do not manage manual authentication to directory (to be managed in a future version).EXAMPLE
C:\PS> import-module Get-ADUserCertificate.psm1
C:\PS> Remove-Module Get-ADUserCertificate
```##
### Get-ADUserCertificate function
```
.SYNOPSIS
get user certificate(s) from contact or user object from an AD
look for a certificate in usercert, usercertificate, usersmimecertificate attributes for object contact and user.DESCRIPTION
Require RSAT if used on non Domain Controller environment.
You can use several search type entry : distinguishedName or SamAccountName/CN or Mail
you can search in another forest/domain using parameter "server" (by default take the current domain for logged on user)
you can export the certificates found in file using "exportcert" parameter (require a file with full path).EXAMPLE
Get-ADUserCertificate -searchtype distinguishedName -searchentry "CN=account,OU=testou1,OU=testou,DC=ad,DC=ad,DC=com" -exportcert "C:\test\test\test.cer"
Get-ADUserCertificate -searchtype Mail -searchentry "[email protected]"
Get-ADUserCertificate -searchtype SamAccountNameOrCN -searchentry "UserAccount1" -server anotherad.ad.com
```### Get-AllADUserCertificates function
```
.SYNOPSIS
get all user certificate(s) from all contact or user objects from an AD
look for a certificate in usercert, usercertificate, usersmimecertificate attributes for all contact and user objects.DESCRIPTION
Require RSAT if used on non Domain Controller environment.
you can search in another forest/domain using parameter "server" (by default take the current domain for logged on user)
you can export the certificates found in file using "exportcert" parameter (require a file with full path)
you can skip warning message with user input using "skipconfirm" parameter.EXAMPLE
Get-ADUserCertificate -exportcert "C:\test\test2"
Get-ADUserCertificate -skipconfirm $true
Get-ADUserCertificate -server anotherad.ad.com
```